Remove trailing comma in JSON