GET /v1/json-flattenFlatten nested JSON to dot-notation
Format Utils lf-format-utils
Pushes nested JSON down into single keys joined by dots. Flatten nested JSON to dot-notation
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
json | string | Yes | Nested JSON to flatten |
separator | string | No | Key separator (default '.') |
Response Schema
flattened (object): Flat key/value map
keys (integer): Number of leaf keys
cURL Example
curl 'https://lf-format-utils.laminarforge.dev/v1/json-flatten?json=%7B%22a%22%3A%7B%22b%22%3A1%7D%7D' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/json-flatten'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'json': '<json>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())