ibireme / yyjson

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

JSON5 Support #132

Open VaslD opened 12 months ago

VaslD commented 12 months ago

Is your feature request related to a problem? Please describe.

No.

Describe the solution you'd like

Would YYJSON support JSON5 standard? It expands the JSON spec to support previously non-standard comments, single quotes, and trailing commas, also adds infinite numbers, multiline strings, and hex representations, etc.

At the moment, I'm more interested in reading JSON5 than having write support. Programs usually have full control of its output, but most inputs may be user-supplied or produced by another program, which may have already adopted JSON5.

Describe alternatives you've considered

Some of these additions in JSON5 can be read/write with YYJSON's nonstandard options, but most of the new syntax is considered invalid JSON, therefore unusable.

Additional context

None.

ibireme commented 12 months ago

I'll consider it in the future, but it's not a high priority right now. Supporting more non-standard JSON formats could affect the parsing performance of standard JSON. So I need to do more evaluation before making any changes.