Data Transformation intermediate 12 min

Find the Record Breaking a JSON Consumer

Use local structure evidence to isolate the record whose shape breaks an otherwise healthy consumer.

Scenario

Most records render, but one customer row crashes a consumer that expects profile.email to be a string. You need the exact record and path without uploading a production sample anywhere.

Broken input

{
  "customers": [
    { "id": "cus_19", "profile": { "email": "ada@example.test" } },
    { "id": "cus_20", "profile": { "email": null } }
  ]
}

Goal

Find the record whose value kind or missing field differs from the comparable records, then capture evidence before deciding whether the consumer or the contract is wrong.

Tool sequence

  1. Open Toolzy JSON Explore and paste a privacy-safe reproduction.
  2. Search for email, select every matching path, and inspect the selected value preview.
  3. Open Observations to review nullable values and inconsistent record shapes.
  4. Use Toolzy JSON Compare if you have a known-good response to compare against.
  5. Use Toolzy JSON Schema only to generate an observed starting point; it cannot prove a nullable field is allowed by the contract.

Checkpoint output

$.customers[0].profile.email  string  "ada@example.test"
$.customers[1].profile.email  null

The breaking record is customers[1]. The sample proves a mismatch, not whether null is permitted.

Common mistakes

  • Searching only keys and missing the value-kind difference.
  • Assuming an inferred schema decides whether a field is required or nullable.
  • Redacting the path that explains the failure before recording it in a local plan.
  • Sharing a customer identifier when a synthetic reproduction is enough.

Related tools and lessons