2018R2 : JSONItem in the debugger

  1. 9 months ago

    Michael D

    8 Aug 2018 Pre-Release Testers, Xojo Pro
    Edited 9 months ago

    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.

  2. Michael D

    8 Aug 2018 Pre-Release Testers, Xojo Pro

    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.

  3. Edited 9 months ago

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

  4. Michael D

    9 Aug 2018 Pre-Release Testers, Xojo Pro

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

    Values can be any of the following types: Strings, numbers, JSONItems, arrays (string, number or boolean), Booleans, or Nil.

    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?

  5. Edited 9 months ago

    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.

or Sign Up to reply!