Fineuralab

Format a JSON API Error Payload

A realistic JSON formatting example for API error payloads, field paths, and validation messages.

Worked example

Task context

A support note includes a compact JSON error payload. Before pasting it into an issue, format it, check the nested field paths, and remove anything that looks like a real customer identifier.

Open the related tool: JSON Formatter

Input and output

Input JSON

{"status":422,"code":"VALIDATION_FAILED","trace_id":"demo-trace-2026","errors":[{"field":"billing.email","message":"Invalid email format"},{"field":"items[0].quantity","message":"Must be greater than 0"}]}

Formatted output

{
  "status": 422,
  "code": "VALIDATION_FAILED",
  "trace_id": "demo-trace-2026",
  "errors": [
    {
      "field": "billing.email",
      "message": "Invalid email format"
    },
    {
      "field": "items[0].quantity",
      "message": "Must be greater than 0"
    }
  ]
}

Checks before copying

  • Confirm the JSON still parses after formatting.
  • Check whether trace_id, user_id, email, or order numbers are safe to share.
  • Keep error order unchanged if it matters to the backend response.

Lesson: Formatting makes structure visible, but it does not make private data safe. Review identifiers before sharing the payload.

Keep working

Reviewed and updated: June 23, 2026