json array with in array returning error ?bad string
<p>i am parsing my json string file to python and always returning error .
i used online json formatter and validators that also returning error so i want help to make my json correct and tell me error</p>

<pre><code> [{
     "sentence_id": "TR.00001",
     "sentence": {

         "text": "Bill was born 1986.",
         "annotation": {
             (1, "Bill", "bill", "NNP", "B-PERSON"),
             (2, "was", "be", "VBD", "O"),
             (3, "born", "bear", "VBN", "O"),
             (4, "1986", "BIL", "CD", "B-DATE"),
             (5, ".", ".", ".", "O"),

         },
         "relations": {
             "subject": "bill",
             "predicate": "DATE of Birth",
             "object": "1986"
         }
     }
 }, ]
</code></pre>

<p>the above is my json string you can check online validators or online json format verifier here is the part of json that returns error</p>

<pre><code>"annotation": {
    (1, "Bill", "bill", "NNP", "B-PERSON"),
    (2, "was", "be", "VBD", "O"),
    (3, "born", "bear", "VBN", "O"),
    (4, "1986", "BIL", "CD", "B-DATE"),
    (5, ".", ".", ".", "O"),
},
</code></pre>

<p>so can you please help me in sorting out the trouble of array with in array using json you can use these editors link <a href="http://www.jsoneditoronline.org/" rel="nofollow">link to json editor</a></p>

<blockquote>
  <p>expecting property name <code>,</code> error in line 8</p>
</blockquote>

<p>JSON doesn't understand tuples, try changing to lists:</p>

<pre><code>"annotation": [
    [1, "Bill", "bill", "NNP", "B-PERSON"],
    [2, "was", "be", "VBD", "O"],
    [3, "born", "bear", "VBN", "O"],
    [4, "1986", "BIL", "CD", "B-DATE"],
    [5, ".", ".", ".", "O"]
]
</code></pre>

<p>You can do <code>tuple(list)</code> to convert back to tuples on the other end.</p>

<p>Also, you had an extra comma on <code>[5, ".", ".", ".", "O"]</code>, I removed it.</p>

javascript php python arrays json