initial conversion to json