Results 1 to 40 of 40

Thread: [VB6/VBA] JSON parsing to built-in VBA.Collections with JSON Path support

Threaded View

  1. #8

    Thread Starter
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    6,167

    Re: [VB6/VBA] JSON parsing to built-in VBA.Collections

    Quote Originally Posted by shagratt View Post
    What will be the right way to detect if a key in the json is an array of results or a simple value?
    JSON arrays and JSON objects are represented as VBA.Collections so easiest would be to just check with something like If IsObject(JsonItem(oRoot, "path/to/propery")) Then

    Usually the exact keys to the interesting values are known in advance from the Web Service documentation so these get hardcoded in the VB6 source.

    For debugging purposes I just use JsonDump like Debug.Print JsonDump(JsonItem(oRoot, "path/to/array"))

    cheers,
    </wqw>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width