"Extra data" error trying to load a JSON file with Python
<p>I'm trying to load the following JSON file, named <code>archived_sensor_data.json</code>, into Python:</p>

<pre><code>[{"timestamp": {"timezone": "+00:00", "$reql_type$": "TIME", "epoch_time": 1475899932.677}, "id": "40898785-6e82-40a2-a36a-70bd0c772056", "name": "Elizabeth Woods"}][{"timestamp": {"timezone": "+00:00", "$reql_type$": "TIME", "epoch_time": 1475899932.677}, "id": "40898785-6e82-40a2-a36a-70bd0c772056", "name": "Elizabeth Woods"}, {"timestamp": {"timezone": "+00:00", "$reql_type$": "TIME", "epoch_time": 1475816130.812}, "id": "2f896308-884d-4a5f-a8d2-ee68fc4c625a", "name": "Susan Wagner"}]
</code></pre>

<p>The script I'm trying to run (from the same directory) is as follows:</p>

<pre><code>import json
reconstructed_data = json.load(open("archived_sensor_data.json"))
</code></pre>

<p>However, I get the following error:</p>

<pre><code>ValueError: Extra data: line 1 column 164 - line 1 column 324 (char 163 - 323)
</code></pre>

<p>I'm not sure where this is going wrong, because from <a href="http://www.json.org/" rel="nofollow">www.json.org</a> it seems like valid JSON syntax for an array of dictionaries. Any ideas what is causing the error?</p>

<p>It is not a valid json;
There are two list in here;
one is</p>

<pre><code>[{"timestamp": {"timezone": "+00:00", "$reql_type$": "TIME", "epoch_time": 1475899932.677}, "id": "40898785-6e82-40a2-a36a-70bd0c772056", "name": "Elizabeth Woods"}]
</code></pre>

<p>and the other one</p>

<pre><code>[{"timestamp": {"timezone": "+00:00", "$reql_type$": "TIME", "epoch_time": 1475899932.677}, "id": "40898785-6e82-40a2-a36a-70bd0c772056", "name": "Elizabeth Woods"}, {"timestamp": {"timezone": "+00:00", "$reql_type$": "TIME", "epoch_time": 1475816130.812}, "id": "2f896308-884d-4a5f-a8d2-ee68fc4c625a", "name": "Susan Wagner"}]
</code></pre>

<p>You can see the validation error in here;
<a href="http://www.jsoneditoronline.org/?id=569644c48d5753ceb21daf66483d80cd" rel="nofollow">http://www.jsoneditoronline.org/?id=569644c48d5753ceb21daf66483d80cd</a></p>

python json