convert data into JSON