Attempt at writing in JSON format and Refresh