JSON.parse can throw

Since JSON.parse can throw it needs to be wrapped in a try catch so the error can be passed back in the callback.