0

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.

zirkelc
  • 1,451
  • 1
  • 23
  • 49

1 Answers1

1

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);

Stefan Wexel
  • 1,154
  • 1
  • 8
  • 14