New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid json parsed without error #7

richcollins opened this Issue Oct 21, 2009 · 2 comments


None yet
4 participants
Copy link

richcollins commented Oct 21, 2009

The following string is parsed as the number 2009



This comment has been minimized.

Copy link

rtyler commented Dec 2, 2009

lloyd, for what it's worth I can reproduce this behavior with py-yajl


This comment has been minimized.

Copy link

davisp commented Apr 5, 2010

FWIW, I got around this issue by doing something like this:

    status = yajl_parse(handle,, bin.size);
    used = yajl_get_bytes_consumed(handle);

    // Parsing something like "2.0" (without quotes) will
    // cause a spurious semi-error. We add the extra size
    // check so that trailing garbage doesn't pass.
    if(status == yajl_status_insufficient_data && used == bin.size)
        status = yajl_parse_complete(handle);

    if(status == yajl_status_insufficient_data)
        return ERROR;

@lloyd lloyd closed this in 986516e Apr 20, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment