`JSON.parse` can throw, this should get wrapped in a `try...catch` and the possible error dealt with somehow.