if we're touching this code, we might as well wrap this in a try/catch, as JSON.parse can throw.