sheredom / json.h

🗄️ single header json parser for C and C++
The Unlicense
698 stars 77 forks source link

Wrong parsing error code for premature end of buffer #47

Closed ederlf closed 7 years ago

ederlf commented 7 years ago

If i try to parse something like this:

{
     "dps":[1, 2, 3
}

the error code returned is json_parse_error_expected_comma Would not be expected to have json_parse_error_premature_end_of_buffer ?

sheredom commented 7 years ago

Yeah that is wrong for sure - it should have said comma or ] for the end of the array. I'll add a test case thanks!