Home/Guides/Fix JSON trailing comma before POST or webhook delivery

Fix JSON trailing comma before POST or webhook delivery

JSON does not allow a comma after the last element in an object or array. JavaScript and some config formats do, which is why copy-paste from code into APIs often breaks. Providers may reject the webhook with 400 before your handler runs.

Common causes

  • Last property in an object ends with `,`.
  • Last array element ends with `,`.
  • Generated JSON from a tool that targets JSON5 instead of strict JSON.

How to fix

  • Delete the comma after the final element.
  • Paste into Request Body Validator to see the exact line and column.
  • Regenerate payloads from a strict JSON serializer.

Use our tool

Validate JSON body