remove extra trailing comma in json