Skip to content
This repository was archived by the owner on Mar 8, 2018. It is now read-only.

yajl does not detect extra data in badly formed string #20

@indigoviolet

Description

@indigoviolet
>>> import yajl
>>> yajl.__file__
'.python_eggs/yajl-0.3.6_-py2.6-linux-x86_64.egg-tmp/yajl.so'
>>> import json
>>> x = '"abc"def'
>>> yajl.loads(x)
u'abc'
>>> json.loads(x)
------------------------------------------------------------
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/Python-1-fb-buildroot/usr/local/lib/python2.6/json/__init__.py", line 307, in loads
  File "/usr/local/lib/python2.6/json/decoder.py", line 322, in decode
    raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 1 column 5 - line 1 column 8 (char 5 - 8)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions