fix extra comma at end of json