c# 解析websocket传过来的json数据

直接上代码

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
 socket.OnMessage = message => {
                    JObject jo = (JObject) JsonConvert.DeserializeObject (message);
                    string username = jo["username"].ToString ();
                    string password = jo["password"].ToString ();
                };

猜你喜欢

转载自blog.csdn.net/sunfellow2009/article/details/84944015
今日推荐