Further refine the json generator