Simple bit of code:
When I run I get
any ideas ?
EDIT: Apparently if I wrap the JSON string as a object, I can make some progress:
Tho I really think the original string is valid JSON and should parse properly...
B4X:
Dim s As String
s = "[{ 'nid': '91', 'url': '/api/node/91' }, { 'nid': '92', 'url': '/api/node/92' }]"
Dim parser As JSONParser
parser.Initialize(s)
Try
Dim l As List
l = parser.NextObject
Catch
Log(LastException.Message)
End Try
B4X:
org.json.JSONException: End of input at character 80 of [{ 'nid': '91', 'url': '/api/node/91' }, { 'nid': '92', 'url': '/api/node/92' }]
any ideas ?
EDIT: Apparently if I wrap the JSON string as a object, I can make some progress:
B4X:
parser.Initialize("{data" & s & "}")
Dim m As Map
m = parser.NextObject
Dim l As List
l = m.Get("data")
'etc
Tho I really think the original string is valid JSON and should parse properly...
Last edited: