C# 读取JSON

引用

Newtonsoft.Json.dll

//C# 读取JSON

Newtonsoft.Json.Linq.JObject jsonStr = Newtonsoft.Json.Linq.JObject.Parse(strResult);
this.txtResult.Text = jsonStr["result"].ToString();//通过key:result 获取对应的值

php 生成 Json 部分  

<?php

$arr_result = array(); //返回值

$arr_result['result'] = '0';
$arr_result['callerid'] = '139411288888';

echo json_encode($arr_result);  

?>

原文地址:https://www.cnblogs.com/hailexuexi/p/5599895.html