Fixed invalid json format

hmm can we re-throw the syntax error from `JSON.parse`? It'll be much more helpful than "invalid json format"