JSON.parse should always be in try/catch

Create a function to wrap JSON.parse and JSON.stringify to enforce some conventions including try/catch.