title: Python: read in an Array of json objects using json.loads()
body: <p>I have a file data.txt which contains a list of json objects like below:</p>
  
  <pre><code>[{"id":"1111","color":["blue"],"length":"120"},{"id":"1112","color":["red"],"length":"130"},{"id":"1112","color":["yellow"],"length":"136"}]
  </code></pre>
  
  <p>I tried to read it using python json.loads:</p>
  
  <pre><code>data = json.loads("data.txt")
  </code></pre>
  
  <p>but then I got the following errors. Did I miss anything here? Thanks a lot!</p>
  
  <pre><code>/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.pyc in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
      336             parse_int is None and parse_float is None and
      337             parse_constant is None and object_pairs_hook is None and not kw):
  --&gt; 338         return _default_decoder.decode(s)
      339     if cls is None:
      340         cls = JSONDecoder
  
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.pyc in decode(self, s, _w)
      363 
      364         """
  --&gt; 365         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      366         end = _w(s, end).end()
      367         if end != len(s):
  
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.pyc in raw_decode(self, s, idx)
      381             obj, end = self.scan_once(s, idx)
      382         except StopIteration:
  --&gt; 383             raise ValueError("No JSON object could be decoded")
      384         return obj, end
  
  ValueError: No JSON object could be decoded
  </code></pre>