Let's improve JSONItem even more

With https://tracker.xojo.com/xojoinc/xojo/-/issues/74489 implemented, I figure let’s try to keep the momentum going. I’ve opened a bunch of feature requests that would make JSONItem even nicer to use.

10 Likes

Definitely some nice suggestions for improvements. Added my thumbs-up vote to those that I would find most useful.

Here’s another good one. Implement JSONPath

I use JSONPath via MBS extensively in a project that uses literally gigabytes of JSON files. It’s a lifesaver and would love to see it as part of Xojo’s JSONItem.

3 Likes

The only one I really agree with is a clone function. It’s easy to do through the constructor and a ToString, but an explicit function name would make for more readable code.

I don’t trust Xojo iterators because the database iterators have so many problems.

The next two make JSONItem akin to the dictionary design I find confuses less skilled users.

Personally I think the GenerateJSON/ParseJSON for Dictionary methods should be removed.

I can understand your desire for path navigation, but it could also be argued that gigabyte sized JSON is really abusing the format (which makes it an edge case)

Those are just my unpopular opinions. Don’t mind me.

Well for the record, it’s thousands of smaller files totaling about 4GB. And I don’t really have a choice of the format. It’s converting UE5 assets into something readable.

Xojo’s iterators work fine. There may be issues with the database iterator, but the iterator mechanism itself works fine. It’s so much nicer to use For Each Entry As DictionaryEntry In Dict than to get the keys into an array and loop through that.

4 Likes

As JSON is the backbone of most APIs nowadays I’m all for making the class more powerful. Iterators would be great, and I’m a big proponent of JSONPath as well.

I actually created an implementation of JSONPath for JSONItem if anyone would find it useful:

4 Likes