使用数据流的方式推送的json格式数据如何接收

            StreamReader reader = new StreamReader(context.Request.InputStream, Encoding.UTF8);
            string jsonstr = reader.ReadToEnd();
            jsonstr = HttpUtility.UrlDecode(jsonstr);
            JObject jo = (JObject)JsonConvert.DeserializeObject(jsonstr);
            string Statu = jo["resultCode"].ToString();//提交状态
            string resultMsg = jo["resultMsg"].ToString();
            string Order = jo["orderid"].ToString();

 

推送成功JSON报文样例: {"orderid":"TB150709055011335","userid":"150709055011888","bizid":"123124324234", "mobile":"18651850720","resultCode":"T00003","resultMsg":"充值成功","refundStatus":""}

推送失败JSON报文样例: {"orderid":"TB150709055011336","userid":"150709055011889","bizid":"123124324235", "mobile":"18651850721","resultCode":"T00004","resultMsg":"充值失败","refundStatus":"退款成功"} 

 

你可能感兴趣的:(接口)