I'm just about finished with a drop-in replacement for JSONItem. It's all Xojo code and emulates all features and functionality of the native class, except:
- It's around as fast, if not faster, to create and load.
- It handles Unicode characters correctly for both values and, in objects, names.
- It throws an exception if you try to add a value it can't handle rather than waiting until you call ToString.
- It is something like 40 times faster when generating large JSON strings. (That is not a typo.)
The last point is why I undertook the project at all. In my test case of 10,000 objects, it takes the native class 4.7 seconds to render a string. It takes my class around 106 milliseconds.
To use it, you'd find and replace all occurrences of JSONItem with JSONItem_MTC, then drag the class to your project.
If there is interest, I will post this as an open-source project on my web site when I get back from vacation. Is there interest?