I am using JSONItems as row tags for a listbox to hold a bunch of additional info. I was converting the JSONItem.ToString, but that is an extra step, and I just started using the JSONItem itself as the Listbox.RowTag. This works great, but I don’t believe the documentation indicates that a JSONItem is a valid Variant Type.
Should (1) the documentation get updated to show JSONItems as a supported Variant Type, or should (2) I stop using JSONItems this way, or (3) do I not completely understand the documentation, and JSONItems are indeed implied somewhere as a viable Variant type?
A variant can be anything. Hence the name. Why would you think you shouldn’t use a JsonItem for a variant?
JSONItems aren’t called out specifically in this documentation.
That would considered an object.
Perfect. Just thought I would check.
The main takeaway here is that Variant (and the new Auto) can hold anything from an intrinsic value to an an object or even an array of those. This, for example, is perfectly valid:
dim arr2() as Variant
dim arr() as Variant
dim v as Variant = arr
// v holds an array of Variant whose only elements is another array of Variant
(If you do something like this though, my guess is that you hate humanity.)