rasc5 / vba-json

Automatically exported from code.google.com/p/vba-json
0 stars 0 forks source link

outcome #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
no steps, this is a question.

What is the expected output? What do you see instead?
How can i read a parsed JSON string as an array?

Original issue reported on code.google.com by tkleinmi...@fenl.nl on 19 Mar 2009 at 7:59

GoogleCodeExporter commented 8 years ago
Here is some test code I wrote:

   Dim S As New cJSON
   Dim o As Object

   ' read the JSON into an object:
   Set o = S.parse("{bla:""hi"", items: [{it:1,itx:2},{i3:'x'}] }")

   ' get the parsed text back:
   Debug.Print S.toString(o)

   ' get data from arrays etc:
   Debug.Print "Bla: " & o.Item("bla") & " - Items: " &
o.Item("items").Item(1).Item("itx")

Original comment by webmas...@ediy.co.nz on 25 Mar 2009 at 6:16