I am building on Windows Phone 7. I noticed in the documentation I can:
JsonObject user = (JsonObject)JsonObject.Load(responseStream);
bool isMember = user["IsMember"];
string name = user["Name"];
int age = user["Age"];
How can I import the JsonObject class?
Add
using System.Json;to the top of your file.Edit
It seems that Windows Phone 7 doesn’t support the
System.Jsonnamespace so you cannot do it this way. After a cursory search, it seems you have to use theDataContractJsonSerializerclass as shown in this MSDN video/source code.You may also want to consider using Json.NET which appears to be much more efficient than the
DataContractJsonSerializer.