# 402utils JSON Transform

> 402utils JSON Transform is a paid API for AI agents from 402utils.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Declaratively reshapes a JSON document into a new structure using a dot-path mapping template, supporting field renaming, array projection, and schema flattening.

## Facts

- Endpoint: POST https://402utils.com/v1/json-transform
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/402utils-json-transform-9d21e794
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vyt1FghGCYJTi4T8fRYdd

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 402utils-json-transform-9d21e794 -d '<json body>'
```

Example prompt: Take this JSON object — {"user":{"first_name":"Alice","contact":{"email":"alice@example.com"}}} — and reshape it so that the output has a top-level 'name' field mapped from 'user.first_name' and an 'email' field mapped from 'user.contact.email'.

## When to prefer this

Use this endpoint when you need a declarative, no-code way to reshape JSON using a template that mirrors the desired output shape. Prefer it over /v1/jq when you want simple field renaming, flattening, or array projection without learning a query language. Ideal for normalizing webhook payloads, adapting API responses to a target schema, or remapping data in an automation pipeline without writing code.

## Known failure modes

- Invalid dot-path syntax in mapping results in null values rather than an error
- Malformed JSON in data or mapping body returns a 400-level error
- Deeply nested or very large documents may time out
- Incorrect wildcard usage on non-array fields yields null instead of projected values
- Missing required fields (data or mapping) returns a validation error

## How this service works

Reshape JSON declaratively — predictable, not a language. `mapping` mirrors the output shape; its leaf strings are dot-paths into `data` (a.b.0.c; negative index ok; 'contacts.*.email' projects over an array; '=text' escapes a literal). Objects/arrays nest; number/boolean/null are literals. Missing paths → null. Field rename/flatten/projection to fit a payload to a target schema. Distinct from /v1/jq (declarative vs query language).

## Output

A new JSON value whose shape mirrors the provided mapping template, with leaf values populated from dot-path lookups into the source document. Missing paths yield null. Array wildcards project over all elements. Literal escape values ('=text') are passed through verbatim.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "data": {
   "description": "The source document — any JSON value."
  },
  "mapping": {
   "description": "The output shape: an object/array whose leaf strings are dot-paths ('user.name'), '*' projections, or '=literal' escapes."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/402utils-json-transform-9d21e794/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402utils.com](https://www.zero.xyz/host/402utils.com/llms.txt)
