Iterating through JSON object in Xojo

The illegal cast exception is what clued me in
Since you assign a “variant” (the only way to do some things in Xojo given how it works today) you get back a variant - in this case your dictionary
That JSONItem.ToString walked the dictionary is … perhaps a bug since a json item SHOULD only contain EITHER key value pairs OR jsonitems - not dictionaries

I could be wrong about this but that seems wrong that you can shove a dict in and it doesnt touch it OR converts it to string … not sure which

1 Like