In the code below, I get a JSONException in the second line. My JSONItem is an array. As far as I can understand, I create a JSON array and all the examples I found seems to use a JSON Dictionary.
Help !
teamName = league.Name(i)
team = league.Value(teamName)
Help me if you can Im feeling down Before I start to decode by myself the JSON text file (using NthField,CountFields and a bunch of Loops )
and so on. The text above is the strings for the Listbox Header. The Rows follow the same schema (definition), excepted for the right part who holds first name, name, wife name, child, Sexe (H: Man, F: Woman in French), etc.
BTW: the slash is escaped (H \/ F)
Greg: no more error message. I only get ‘:’ (without the quotes) when I add a row in the target Listbox.
BTW: I can get the number of entries in the JSONItem (around 1970, same as RecordSet in the source sqlite data base file).
So, if I want to get a JSONitem (I think a specific RecordSet), I have to code:
Single_JSONItem = MyJSON.Value(Loop_Idx) ?
I go test that No. I get a JSONException.
[code] For Loop_Idx = 1 to MyJasonCnt // As I wrote earlier, I get the number of entries in the array
SingleJason = MyJason.Value(Loop_Idx) // I tried to get a JSON entry (it have 11 fields
JSONName = SingleJason.Value(0) // 0 for the test [/code]
[code] For Loop_Idx = 0 to MyJasonCnt
SingleJason = MyJason.Value(Loop_Idx)
SingleJasonCnt = SingleJason.Count - 1
Dim TheJSON As JSONItem
For j As Integer = 0 to SingleJasonCnt
JSONName = SingleJason.Name(j)
LB.AddRow JSONName
If UserCancelled Then Exit
Next
If UserCancelled Then Exit
Next[/code]
Fills the Listbox with the column names: left part of the JSON, not the right part, the part I want.
I tried: JSONName = SingleJason.Value(j), but this does not work. The error is strange !
JSONItem is not an array.
ExceptionError Number 12.
A Jsonitem can be a group of name/value pairs, or an array of JsonItem.
A JsonItem begins with “{” and ends with “}”
An array begins with “[” and ends with “]”