exercise in conversion to json