refining json conversion