convert to json from text