Reputation: 49
I'm building an app using Xamarin.Android and I've come across an issue where JSON.NET never finishes parsing. I've tried both the JsonConvert and JObject classes. Calling the parse methods never finishes. I added a breakpoint on the line that parses the string and one after it. The one after never hits.
What I've tried:
I'm using the latest version of Xamarin.Android and JSON.NET that are available at this moment.
Does anyone know what I'm doing wrong or why this doesn't work? JSON Deserialization is very important for this app.
Thank you in advance
Upvotes: 0
Views: 74
Reputation: 49
Alright, seems that I have figured it out. My input json was indeed the issue. I was trying to directly parse the input to an object, when the input json was an array with one single object in it. Parsing to a JArray worked fine right away.
Answering my own question just in case anyone hits the same issue and oversees the same thing :)
Turns out any input I tried had this same format of an array with one single object in it.
Upvotes: 1