GET /v1/json-formatPretty-print JSON with indentation
Format Utils lf-validation-utils
Neatly indents JSON text so a person can read it. Formats a JSON string with configurable indentation for readability.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
json | string | Yes | JSON string to format |
indent | integer | No | Indent spaces |
Response Schema
success (boolean): Operation success
formatted (string): Pretty-printed JSON
cURL Example
curl 'https://lf-validation-utils.laminarforge.dev/v1/json-format?json=%7B%22a%22:1%7D' -H 'Authorization: Bearer lf_YourApiKey'
Python Example
import requests
url = 'https://lf-validation-utils.laminarforge.dev/v1/json-format'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'json': '{"a":1}'}
response = requests.get(url, headers=headers, params=params)
print(response.json())