One problem · bounded diagnostic

JSON trailing comma: validate a minimal repair

A trailing comma before a closing brace or bracket is invalid JSON. Repair the syntax while preserving the intended data.

Locate the parse failure

Use the parser line and column with a tiny synthetic sample. Check the comma immediately before } or ]; do not broadly remove commas inside quoted strings.

Separate syntax from schema

Successfully parsing JSON establishes syntax only. Required fields, types and business meaning need separate checks against the expected schema.

Inspect the repaired value

Compare the parsed object with the intended value. Keep the original sample and review any changed characters before applying a fix to important data.

Evidence to keep

A synthetic JSON sample under 4 KiB, with names, account details, tokens and other private data removed.

Scope of this check

The bounded free JSON probe can return an actionable syntax artifact when supported. It does not guarantee that the data meets your application contract.

Run a minimal JSON before-and-after check

Synthetic Node.js example. This repair removes only the comma before the closing brace; it uses no customer data or external request.

try { JSON.parse('{"status":"ok",}'); }
catch (e) { console.log(e.name); }
const value = JSON.parse('{"status":"ok"}');
console.log(value.status);

Expected output: SyntaxError, then ok. Parsing successfully does not establish schema validity. Check required fields and types separately.

Need a scoped review? See the service scope and current price. Accept a quote only after reviewing its scope and available payment methods.

Related troubleshooting guides

Try the free probe

Use a sanitized symptom or a synthetic sample. The request goes to the existing NAIF diagnostic API. No payment or repair is started.

Review this service, current price and quote options

Availability is determined by the existing service and country policy. A diagnosis or quote does not confirm payment or guarantee a repair.

Use this guide with an AI agent
{
  "source": "discovery_pages_v1",
  "version": "2.0.0",
  "intentManifest": "/.well-known/naif-intents.json",
  "agentCard": "/.well-known/agent-card.json",
  "page_id": "json-trailing-comma",
  "intent": "json_trailing_comma_repair",
  "productId": "json-validity-check",
  "capability": "/api/agent/catalog",
  "pricing": "/api/agent/catalog",
  "probe": {
    "method": "POST",
    "endpoint": "/api/agent/probe",
    "body": {
      "productId": "json-validity-check",
      "source": "discovery_pages_v1",
      "input": {
        "jsonText": "{\"status\":\"ok\",}"
      }
    }
  },
  "quote": "/api/agent/quote",
  "acceptQuote": "/api/quote/accept",
  "offers": "/.well-known/naif-offers.json",
  "checkout": "Use only the checkoutEndpoint returned by the existing quote acceptance API when checkoutEligible is true.",
  "attribution": "Retain the __Host-naif_discovery cookie, or echo X-Naif-Discovery-ID returned by this page on same-origin API requests. Do not treat the identifier as authentication."
}
Existing agent discovery