Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

NSJsonSerialization.Deserialize signature problem

$
0
0

I am using both Serialize and Deserialize.

Serialize looks correct with error passed as reference.

NSError error = null;
NSData jsonData = NSJsonSerialization.Serialize (data, 0, out error);

Deserialize looks incorrect and in fact, for it to work, I have to pass in an error! That certainly doesn't seem right to me unless I am missing something.

NSError error = new NSError();
NSDictionary jsonDict = (NSDictionary)NSJsonSerialization.Deserialize (jsonData, 0, error);

Ted


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>