How can we help you?

Infer a Dataset from Sample Data

Product: FeraRender Topic: Data and Field Mappings Versions: Applies to all documented versions Current

Generate a starter dataset tree from representative JSON.

Audience: Template authors
Recommended visibility: Public

Overview

Generate a starter dataset tree from representative JSON. Dataset and mapping work defines the contract between application data and template content. Stable names and representative samples reduce downstream breakage.

Key points

  • Provide realistic sample data rather than a minimal happy path.
  • Inference identifies objects, arrays, primitive types, children, and paths.
  • Array inference uses the first representative item.
  • Review inferred types before publishing.
  • Keep sensitive production data out of permanent samples.

Example

{
  "sampleData": {
    "Matter": {
      "caption": "Example v. Example",
      "caseNumber": "CL-2026-000001"
    },
    "Clients": [
      {
        "displayName": "Alex Example",
        "email": "alex@example.com"
      }
    ]
  }
}

Replace bracketed values with values issued for the target environment. Never place production tokens, API keys, or client data in screenshots or public examples.

Recommended procedure

  1. Start with representative source data.
  2. Define or inspect the dataset tree.
  3. Create explicit placeholder-to-XPath mappings.
  4. Scan, validate, and test the affected template with missing and repeated values.

Troubleshooting

Validation reports MAPPING_REQUIRED

Create a mapping for every unresolved placeholder and run validation again.

A mapping resolves the wrong field

Look for normalized-name collisions and verify the XPath against sample XML.

An array field is missing from the inferred tree

Use representative sample data with at least one complete array item.

Related documentation


Documentation source: feradelinc/feradel.render.api, reviewed against repository revision b2c3a710. Verify behavior against the deployed release before publishing exact routes, limits, or version requirements.