input data to json conversion