Hi
Today I finished the
JSON parser, which strictly follows the guidelines of
https://www.json.org/.
The ANSI compilation target was a little tricky as the native JSON format is
UTF8. The solution to this problem is to use wide strings internally, which are translated into the current CodePage at the end.
The WIDE compilation target was easier to implement thanks to the
UTF8ToWide function.
I successfully tested the code on several JSON files that I found on the internet.
A note on numeric and boolean values: both are recognized when reading, but not translated into a value.
It is up to the host to interpret the string value and convert it to the desired format, e.g. BYTE, WORD, DWORD, QWORD, REAL4, REAL8 etc.
It remains to test the performance for the next few days, but I am confident that this is very acceptable.
The source is attached to the first post.
Regards, Biterider