format data into JSON