POST /v1/json-to-yamlConvert JSON to YAML
Format Utils lf-format-utils
Turns JSON data into YAML text. Converts a JSON object to a basic YAML-like representation.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
json | string | No | JSON string |
Response Schema
success (boolean): Operation success
yaml (string): Converted YAML output
cURL Example
curl -X POST 'https://lf-format-utils.laminarforge.dev/v1/json-to-yaml' -H 'Authorization: Bearer lf_YourApiKey' -H 'Content-Type: application/json' -d '{"name":"Alice"}'Python Example
import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/json-to-yaml'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
data = {'name': 'Alice'}
response = requests.post(url, headers=headers, json=data)
print(response.json())