Android Question Json prase error [java.lang.RuntimeException: JSON Array expected.] SOLVED

itgirl

Active Member
Licensed User
Longtime User
Hello guys i have a very simple Json

B4X:
{"_status":"ERROR","_message":"Invalid authentication information"}

as you can see its pretty plain I've tried parsing using
B4X:
Dim parser As JSONParser
parser.Initialize(JsonString)
Dim root As Map = parser.NextObject
Dim _message As String = root.Get("_message")
Dim _status As String = root.Get("_status")

always return error [java.lang.RuntimeException: JSON Array expected.]
and since my json start with a { then its a map but i've tried list too but with no luck !! so anyone can help
 

itgirl

Active Member
Licensed User
Longtime User
Solved, it appear that something was wrong with the headers or something im not sure as i was parsing directly from input
 
Upvote 0
Top