---
title: Convert YAML to JSON
slug: convert-yaml-to-json
docTags: 
createdAt: 2022-12-28T05:34:48.000Z
---

Converts a YAML configuration file to JSON format. Supports most yaml conversions. Useful to process yml files from Open API Specifications and other configurations to process further in the automation



### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/json/fromyaml",
  "name": "YML to JSON",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "28UsDqyeH3QRdmtVamSQT",
        "code": "{\n    \"output\": {\n        \"title\": \"Sample Pet Store App\",\n        \"summary\": \"A pet store manager.\",\n        \"description\": \"This is a sample server for a pet store.\",\n        \"termsOfService\": \"https://example.com/terms/\",\n        \"contact\": {\n            \"name\": \"API Support\",\n            \"url\": \"https://www.example.com/support\",\n            \"email\": \"support@example.com\"\n        },\n        \"license\": {\n            \"name\": \"Apache 2.0\",\n            \"url\": \"https://www.apache.org/licenses/LICENSE-2.0.html\"\n        },\n        \"version\": \"1.0.1\"\n    },\n    \"size_in_bytes\": 762.0\n}",
        "language": "200"
      },
      {
        "id": "yIX64DyIuDPJgBRFSfAWb",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "28UsDqyeH3QRdmtVamSQT"
  },
  "examples": {
    "languages": [
      {
        "id": "ENcJz9TStG38F0X-taA4x",
        "code": "{\n    \"input\":\"title: Sample Pet Store App\\nsummary: A pet store manager.\\ndescription: This is a sample server for a pet store.\\ntermsOfService: https://example.com/terms/\\ncontact:\\n  name: API Support\\n  url: https://www.example.com/support\\n  email: support@example.com\\nlicense:\\n  name: Apache 2.0\\n  url: https://www.apache.org/licenses/LICENSE-2.0.html\\nversion: 1.0.1\"\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ENcJz9TStG38F0X-taA4x"
  },
  "description": "\nCall the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

















