open-source-parsers / jsoncpp

A C++ library for interacting with JSON.
Other
8.06k stars 2.63k forks source link

add "allowHexadecimal" reader option #1510

Open Caldfir opened 11 months ago

Caldfir commented 11 months ago

Adds optional read-support for hexadecimal numbers matching 0x[0-9a-fA-F]{1,16} (size depends on LargestUInt). New capability is tied to the allowHexadecimal reader-option.

Not sure if there is much interest aside from myself. This would contribute to possible future JSON5 support which does seem to have been considered (https://github.com/open-source-parsers/jsoncpp/issues/209 https://github.com/open-source-parsers/jsoncpp/issues/723). Would need to support leading (+|-) for this to be compliant with the JSON5 spec.