Hello
I’m pretty new to Xojo and fail on simple things. I would like to display a value of a Json object:
[code]Var nameList As String = “[{”“name”": ““john””}]"
Dim allNames As New JSONItem
allNames.Load(nameList)
MessageBox( allNames.Value(“name”) )[/code]
On executing this code it jumps into the Debugger without telling me whats wrong. The visual bug sticks to the MessageBox (last line). What do I have to do to display the name “john” of JSon object with key “name”?
Further tries to access the value (john) of key “name”, all with errors:
MessageBox( allNames(“name”) )
MessageBox( allNames[“name”].Value )
MessageBox( allNames(“name”).Value )
Also tried to load a Json structure into Dictionary (what I want in the end) but fails as well, no error message:
Var nameList As String = “{ ““person”” : { ““name””: ““John”” } }”
Dim opCodes As Dictionary = Xojo.Data.ParseJSON(nameList.ToText)