ibireme / yyjson

The fastest JSON library in C
https://ibireme.github.io/yyjson/doc/doxygen/html/
MIT License
3.07k stars 267 forks source link

Improve error messages #168

Closed CarterLi closed 4 months ago

CarterLi commented 4 months ago

As discussed in https://github.com/ibireme/yyjson/issues/166#issuecomment-2102133003

We are reporting unexpected character, which is a general error and may not be very helpful. Can we report what charactor yyjson expects?

For example: https://github.com/fastfetch-cli/fastfetch/issues/866#issuecomment-2094258422

Can we report a comma is expected?

ibireme commented 4 months ago

Fixed: https://github.com/ibireme/yyjson/commit/9b2c8b216a3672c5267714f7131b1ce84dcf77d4