lloyd / yajl

A fast streaming JSON parsing library in C.
http://lloyd.github.com/yajl
ISC License
2.15k stars 435 forks source link

yajl_get_error after yajl_complete_parse #221

Open eatnumber1 opened 4 years ago

eatnumber1 commented 4 years ago

If yajl_complete_parse fails, you don't necessarily have the last buffer passed to yajl_parse around with which to call yajl_get_error.

I don't see a documented way to get an error message from yajl_get_error without a buffer, but from a cursory reading of the code, it seems like the following will work:

yajl_get_error(handle, false, NULL, 0);

Is this properly supported? Can it be added to the documentation?