{"from":"yaml","to":"json","result":"{\n \"name\": \"Ana\",\n \"roles\": [\n \"admin\",\n \"editor\"\n ],\n \"active\": true\n}"}
curl --location --request POST 'https://zylalabs.com/api/13173/structured+data+format+converter+api/26719/convert+a+document' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw 'name: Ana
roles:
- admin
- editor
active: true'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 Structured Data Format Converter API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
(年度计费可节省 2 个月 🎉)
领先企业的信赖之选
One endpoint to translate between the four common structured text formats. Send the content as the request body, choose the source and target formats, and receive the converted document.
Useful for migrating configuration files between formats, talking to legacy systems, exporting data for spreadsheet users, and normalizing mixed format feeds.
转换文档端点允许用户在四种格式之间转换结构化文本数据:JSON、YAML、XML 和 CSV。这对于迁移配置文件、与遗留系统集成以及标准化混合格式的馈送非常有用
The endpoint accepts parameters such as "from" to specify the source format and "to" to indicate the target format. Users must provide the data in the request body for conversion.
The response data is structured as a JSON object containing three key fields: "from" (source format), "to" (target format), and "result" (the converted document). This structure allows users to easily identify the conversion details.
Accepted parameter values for the "from" and "to" fields include "json," "yaml," "xml," and "csv." Users must ensure they select valid formats for successful conversions.
返回的数据是JSON格式,其中“result”字段包含作为字符串的转换文档。例如,将YAML转换为JSON将生成一个表示原始数据结构的JSON对象
Typical use cases include migrating configuration files between formats, exporting data for spreadsheet users, and integrating data from mixed format feeds into a unified structure for processing.
Users can parse the "result" field to access the converted document. This allows for further processing, storage, or integration into applications, depending on the target format selected.
The API employs deterministic algorithms to ensure consistent output across conversions. This minimizes discrepancies and maintains data integrity, making it suitable for delivery jobs and data pipelines.