changing datatype to json