Data & Payload Slimming

JSON Projection & Key Mapping

Direct Definition

JSON Projection is the declarative extraction, transformation, and renaming of specific nested properties from upstream API payloads into a clean target schema. Executed at the edge without unsafe eval() functions, it delivers lightweight, structured JSON tailored to client UI components.

Technical Architecture & Deep-Dive

Traditional API transformation requires writing and deploying boilerplate code in JavaScript, Python, or Go. Engineers parse JSON, write object mapping functions (`res.user_name = upstream.data.attributes.first_name`), handle null safety, and deploy containerized services.

Declarative JSON projection replaces imperatively written code with structured configuration. By defining target paths, source steps, and dot-notated source paths, edge engines execute field mapping and type coercion in microsecond isolate runtimes with zero security risk.

Key Architectural Benefits

Standardizes disparate third-party naming conventions (e.g. snake_case to camelCase).
Flattens deeply nested API objects into clean, single-level client payloads.
Operates declaratively without arbitrary code evaluation or execution risks.

Declarative Mapping Spec

json
{
  "targetPath": "customerEmail",
  "sourceStep": "stripeCustomer",
  "sourcePath": "data.attributes.email_address",
  "type": "string"
}
REALCOMPOSER EDGE WORKSPACE

Explore Declarative Key Mapping

Select, rename, and project JSON fields visually in your browser with live syntax validation.

LAUNCH TOOL

Frequently Asked Questions

Q:Can JSON projection map nested arrays?

Yes. Advanced edge mapping engines traverse array indexes and object graphs to extract specific elements or project uniform structures across collection items.

Related Architecture Concepts

Ready-to-Use Edge Recipes