title: Get line and column number of items from a json file
body: <p>I am creating a typescript library to validate a JSON file against some custom constraints, for example I have this json file:</p>
  <pre><code>[
    {
      &quot;nodes&quot;: [
        {
          &quot;id&quot;: 1,
          &quot;name&quot;: &quot;node 1&quot;
        },
        {
          &quot;id&quot;: 1, // &lt;--- here needs to throw an error because of duplicate ids
          &quot;name&quot;: &quot;node 2&quot;
        }
      ],
  
      &quot;edges&quot;: [
        {
          &quot;id&quot;: 1,
          &quot;nodeId&quot;: 1,
          &quot;name&quot;: &quot;edge 1&quot;
        },
        {
          &quot;id&quot;: 2,
          &quot;nodeId&quot;: 3, // &lt;--- here needs to throw an error because of node id does not exist
          &quot;name&quot;: &quot;edge 1&quot;
        }
      ]
    }
  ]
  </code></pre>
  <p>I am already using <code>json shcema</code> to validate against the structure of the json (like <code>required</code> properties, types...).</p>
  <p>Using typescript I can easily loop throw the 2 lists and find the errors but the problem is that i can't get the location of that error (<code>line</code> &amp; <code>column</code>) so is there a way to get line numbers for my errors? and if it is not possible then is there another way to return a useful error for the users?</p>