improve the JSon generation