save formated JSON data