converting data to json