php中的使用:
json_encode 将数组转化成json。

成功返回 json 编码的 string ,失败返回 false 。

json_encode(array("result"=>'1',"msg"=>"编辑成功!","memberId"=>$memberId));
json_decode 将json转换成对象/数组。

当第二个参数为true返回 array ,默认是false返回object。
原文链接:https://blog.csdn.net/L_K_ong/article/details/85321041