There's a bug with the "restart" JSON API command. It returns this data on success:
{"RESTART","id":1}
Of course, this is not valid JSON, so it has to be parsed differently and handled as a special case in my API:
https://github.com/hashware/node-cgminer-api.