Put JSON.parse/stringify in a function for clarity