I have this error :
Error parsing string: Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
how to allow fragments?
Error parsing string: Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
how to allow fragments?
B4X:
Dim parser As JSONParser
jsonstring = "{"message":"ok","error":{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTM3NzkyMDB9.irt65S41YrqnozMrDJXxHddk1JcTFiLxGcfcLXbf2jE","userid":"10"}} "
parser.Initialize(jsonstring)
Dim messagex As Map
messagex = parser.NextObject
Last edited: