c# - Serializing in Json.net -
i want know serialize json data > csharp send json request server , how deserialize server response csharp object
i using json.net framework
{ "jsonrpc":"2.0", "method":"call", "params": { "session_id":"90334", "context":{} }, "id":"r5" }
there no question here assuming want serialize json string object? @ least post have tried , errors receiving if any. per json.net web site found here http://james.newtonking.com/pages/json-net.aspx
string json = "<you json string>"; jobject o = jobject.parse(json); // here how access string jsonrpc = (string)o["jsonrpc"]; // access array of object jarray sizes = (jarray)o["<arrayname>"]; string arrayentry = (string)sizes[0];
Comments
Post a Comment