---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
<ipython-input-5-18a78f9d9cd2> in <module>()
----> 1 import_to_es('grid_2015_10_09.json')
<ipython-input-3-c60a1e7d90bb> in import_to_es(filename)
4 f.readline()
5 f.readline()
----> 6 list(map(to_es, f))
<ipython-input-4-821173d27921> in to_es(record)
1 def to_es(record):
----> 2 jsond = json.loads(record[0:-2])
3 es.index('grid', 'inst', jsond, id=jsond['id'])
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
317 parse_int is None and parse_float is None and
318 parse_constant is None and object_pairs_hook is None and not kw):
--> 319 return _default_decoder.decode(s)
320 if cls is None:
321 cls = JSONDecoder
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py in decode(self, s, _w)
337
338 """
--> 339 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
340 end = _w(s, end).end()
341 if end != len(s):
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/decoder.py in raw_decode(self, s, idx)
353 """
354 try:
--> 355 obj, end = self.scan_once(s, idx)
356 except StopIteration as err:
357 raise JSONDecodeError("Expecting value", s, err.value) from None
JSONDecodeError: Expecting ',' delimiter: line 1 column 1060 (char 1059)