how to properly convert avro schema into a json schema
<p>I have the following json data object:</p>

<pre><code>{
    "name": "John",
    "favorite_number": 5,
    "favorite_color" : "green"
}
</code></pre>

<p>The JSON schema for this object looks like this:</p>

<pre><code>{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Person",
    "description": "some description",
    "type": "object",
    "properties": {
        "name": {
            "description": "name",
            "type": "string"
        },
        "favorite_number": {
            "type": "number",
        },
        "favorite_color": {
            "type": "string",
        },
    },
    "required": ["name", "favorite_number","favorite_color"]
}
</code></pre>

<p>I'm able to use this JSON schema, to validate whether my data object conforms to it:</p>

<pre><code>public static boolean isJsonValid(String schemaText, String jsonText) throws ProcessingException, IOException
    {   
        final JsonSchema schemaNode = getSchemaNode(schemaText);
        final JsonNode jsonNode = getJsonNode(jsonText);
        return isJsonValid(schemaNode, jsonNode);
    } 
</code></pre>

<p>In my java application, I'm receiving a corresponding AVRO schema for this object from a REST API call, and that schema looks like this:</p>

<pre><code>{
 "namespace": "example.avro",
 "type": "record",
 "name": "Person",
 "fields": [
     {"name": "name", "type": "string"},
     {"name": "favorite_number",  "type": ["int", "null"]},
     {"name": "favorite_color", "type": ["string", "null"]}
 ]
}
</code></pre>

<p>Is there a commonly acceptable way of converting such AVRO schema into a JSON schema?</p>