change java object to json object or return them