POST /v1/yaml-to-jsonConvert YAML to JSON
Format Utils lf-format-utils
Turns YAML text into JSON data. Accepts YAML text and converts it to a JSON object. Supports key:value, nested objects, and arrays.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
yaml | string | No | YAML text (alt to body) |
Response Schema
success (boolean): Operation success
json (object): Parsed JSON object
cURL Example
curl -X POST 'https://lf-format-utils.laminarforge.dev/v1/yaml-to-json' -H 'Authorization: Bearer lf_YourApiKey' -H 'Content-Type: text/plain' -d 'key: value\nname: Alice'
Python Example
import requests
url = 'https://lf-format-utils.laminarforge.dev/v1/yaml-to-json'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
data = 'key: value\nname: Alice'
response = requests.post(url, headers=headers, data=data)
print(response.json())