title: How to find parent Json node while parsing a JSON
body: <p>I am parsing a JSON Stream using Jackson. </p>
  
  <p>API that I am using is <code>ObjectMapper.readTree(..)</code> </p>
  
  <p>Consider following stream:</p>
  
  <pre><code>{
    "type": "array",
    "items": {
        "id": "http://example.com/item-schema",
        "type": "object",
        "additionalProperties": {"$ref": "#"}
    }
  }
  </code></pre>
  
  <p>Now when I read additionalProperties, I figure out there is a "$ref" defined here. Now to resolve the reference, I need to go to its parent and figure out the id (to resolve the base schema).</p>
  
  <p>I can't find any API to go to parent of JsonNode holding additionalProperties. Is there a way I can achieve this?</p>
  
  <p>Info:</p>
  
  <p>Why I need this is I need to find the base schema against which $ref has to be resolved. And to figure out base schema, I need to know the id of its parents..</p>