I am developing a C#/XAML metro application in which I comsume a JSON REST Services. How can I deserialize a JSON response into a text or a custom object?
The official JSON APIs for Windows Store Apps are in the Windows.Data.Json namespace:
JsonObject.Parse() or new JsonOject() for objects, it works more less like a Dictionary<TKey, TValue>.JsonArray.Parse() or new JsonArray() for arrays, it work more less like a List<TValue>.JsonValue.Parse(), JsonValue.CreateStringValue(), JsonValue.CreateBooleanValue() or JsonValue.CreateNumberValue() for string, boolean, number and null values.Check some samples here: http://msdn.microsoft.com/en-us/library/windows/apps/hh770289.aspx
You won't need to add any library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With