Reputation: 1723
I'm looking for a Serializer for Windows Phone 8. The DataContractSerializer doesn't work for me because the data members needs to be public and they need public setters.
I don't need a huge library for tombstoning, I think a smart serializer would fit for me. It would be nice if the serializer returns a serialization-string that can be stored into PhoneApplicationPage.State because i Dont't want to use the IsolatedStorage.
Upvotes: 0
Views: 192
Reputation: 1154
Well you could use Json.net which you can install with nuget.
Not sure if that works for you though, when DataContractSerializer doesn't. Serialize example:
String result = await JsonConvert.SerializeObjectAsync(yourobject);
or
String result = JsonConvert.SerializeObject(yourobject);
and deserialize example:
T _data = Newtonsoft.Json.JsonConvert.DeserializeObject(yourstringobject);
Upvotes: 1