change registration output to JSON object