Nykakin / chompjs

Parsing JavaScript objects into Python data structures
MIT License
197 stars 11 forks source link

Fails for hexadecimal values #12

Closed Nykakin closed 3 years ago

Nykakin commented 4 years ago

The library doesn't support parsing hexadecimal values:

>>> import chompjs
>>> chompjs.parse_js_object('{"test": 0x12}')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mariusz/Documents/Projekty/chompjs/chompjs/chompjs.py", line 29, in parse_js_object
    raise ValueError("Parser error: ... {}".format(str(exception).encode('utf-8')))
ValueError: Parser error: ... b'12}'
Nykakin commented 3 years ago

Resolved since 1.1.0.