I have been playing around with integrating some webservices into my system and started using LitJson based on some posts around here. However I’ve come across a bizarre error that seems to only manifest itself on iOS. Most times this code works just fine, but sometimes I am getting “Uninitialized JsonData” for the ToString.
this.lastResponse = responseData;
JsonData jsonFences = JsonMapper.ToObject( responseData );
GeoFence fence;
for ( int i = 0; i < jsonFences["fences"].Count; i++ )
{
fence = new GeoFence();
fence.id = jsonFences["fences"][i]["id"].ToString();
fence.name = jsonFences["fences"][i]["name"].ToString();
print ("Processed fence " + fence.name);
fenceList.Add( fence );
}
Not sure where that is coming from. Weirdness. Even looking through the code in XCode there doesn’t appear to be an issue with the JSON, just the interpretation of it by LitJSON.
I have same issue! I’m trying to read response from FB.API, sometimes it works but suddenly it starts showing Uninitialized Json data. Also some times it gives me Key doesn’t exist error although the response is same.
There are some issues with AOT and collections that cause GetEnumerator() to break. It also appears that sometimes arrays get destroyed and filled with 0’s. Similar issues have been reported here: