Closed
Description
JavaScript variables in the "wild" often have keys in numeric form. As an example, here's an extract of one from a webpage at www.sec.gov:
{"10-12B":"a|3|Registration of securities [Section 12(b)]",144:"a|2|Report of proposed sale of securities"}
Unfortunately this seems to choke the library:
>>> import json5
>>> json5.loads('{"10-12B":"a|3|Registration of securities [Section 12(b)]",144:"a|2|Report of proposed sale of securities"}')
ValueError: <string>:1 Unexpected "4" at column 61
Not sure if this is a library design choice (not mentioned in the docs) or an oversight, but thankfully in the interim the demjson3
library does work with them.
Metadata
Metadata
Assignees
Labels
No labels