2018R2 : JSONItem in the debugger

I’m seeing some cases where a JSONItem’s ToString value in the debugger is blank. I think this stared around 2018R2, but I’m not sure.

A simple test like this seems fine:

dim foo as new JSONItem
foo.value("x") =42
dim bar as new JSONItem
bar.Append 123
bar.append 234
foo.value("bar") = bar
break // look at foo in the debugger

But in a real-world example of much more complexity, the Debugger shows .ToString as blank (and clicking on the value shows a 0 byte string).

Anyone else seeing this?

Edit: Xojo 2018R2 IDE, 64 bit Cocoa builds on macOS 10.12.6.

More testing, I’m seeing strange things - it seems that if I’m in the debugger, and viewing a JSONitem (which looks valid) and then I step out of the function, sometimes the debugger just gets hosed and shows a blank page.

ToString can be blank if one of the values is not a valid json type.

According to https://documentation.xojo.com/index.php/JSONItem

and yet I just did a test with a JSONItem containing a Dictionary and toString shows up fine in the debugger. Is the documentation incorrect?

well… JSONItem is a dictionary under the hood, so if that dictionary has string keys and the values are valid JSON values, it’d probably still work.

You just can’t put something like a date object in there.