json.parse can throw, so you'll need a try/catch here, especially if we never expect to ever see bad input.