title: Can we interchange JSON schema with YAML schema? or viceversa?
body: <p>I have a device application which gets the data in JSON format. This JSON format is generated by another web based application using a YAML schema.</p>
  <p>Now, as the web tool validates this JSON data file against the YAML schema, my device application also has to validate it against a schema. Since, the resource on my device is limited and we already have json schema validation in place, we are restricted to use schema in JSON format only.</p>
  <p>So, my question is could we replace the YAML schema with JSON schema for the web tool? The web application has Swagger.</p>
  <p>On another note, is there any existing script or open source tool to convert YAML schema to JSON schema?</p>
  <p>Not sure about the OpenAPI definition. Its a simple schema file that will be used to validate JSON data. The JSON schema (draft v4) has below format. Our device application is in C++ language. Not sure about what is used in Web Tool, but it has some Swagger framework that generates the JSON data file for us.</p>
  <pre><code>{
    &quot;$schema&quot;: &quot;https://json-schema.org/draft/2019-09/schema&quot;,
    &quot;definitions&quot;: {
    ...
    
      &quot;foobar_Result&quot; : {
        &quot;type&quot; : &quot;object&quot;,
        &quot;properties&quot; : {
          &quot;request&quot; : {
                  &quot;type&quot; : &quot;integer&quot;
                },
          &quot;success&quot; : {
                  &quot;type&quot; : &quot;boolean&quot;
                },
          &quot;payload&quot; : {
                  &quot;type&quot; : &quot;array&quot;, &quot;items&quot; : {&quot;$ref&quot; : &quot;#/definitions/foobar_Parameter&quot;}
                }
        },
        &quot;required&quot; : [&quot;request&quot;],
        &quot;additionalProperties&quot; : false
      }
    },
    &quot;$ref&quot; : &quot;#/definitions/foobar_Result&quot;
  }
  </code></pre>