Skip to main content

Validate a JSON Payload

Learning goals

Build and inspect a typed validation contract.

Quick reference: Level 2; starter; output type validation_summary; estimated cost: none.

Architecture

Text alternative: The graph contains FlowBeads/input, JSON/JSON Parse, ComponentBeads/const Object, Test/JSONSchemaValidator, DataBeads/template, FlowBeads/output. It accepts public input and returns a public result.

Prerequisites

None.

Connections

None.

Secrets

No paid secret is required.

Build and run

  1. Review the schema constant.
  2. Run valid and invalid payloads.
  3. Inspect the validation summary.

Use this fixture in the Test panel:

Valid customer
{"name":"Ada","email":"ada@example.com"}

Expected result

  • isValid is true
  • errors is empty
  • summary is returned

Open the persisted run and verify the node timeline. Browser sinks appear in the Inspector; public output appears in the run result when enabled.

Side effects and cost

This Braid has no external side effect.

Cost: none. DataBraid stores summaries and structured errors, not secret values.

Extensions

  • Change the fixture and compare the node-level timeline.
  • Add a Data Probe before the final output.
  • Save a known-good fixture for regression testing.