用法:
//解析json数据
s text = "{\"id\":1, \"name\":\"xiaobai\", \"age\":16}"
s jo = zf.json(text)
// 获取根json对象
s json = jo.json
//获取id
s id = jo.hq(json, "id")
//获取name
s name = jo.hq(json, "name")
//获取age
s age = jo.hq(json, "age")
//修改age数据
jo.sz(json, "age", 20)
//删除id数据
s sc = jo.sc(json, "id")
//打印json数据
s text = jo.json(json)
//解析json列表数据
s text = "{\"userlist\":[{\"id\":1, \"name\":\"niubi\", \"age\":16},{\"id\":2, \"name\":\"wangba\", \"age\":18},{\"id\":3, \"name\":\"goudan\", \"age\":17}]}"
s jo = zf.json(text)
// 获取根json对象
s json = jo.json
//获取json对象列表
s list = jo.dxlb(json, "userlist")
// 获取列表的长度
s size = jo.cd(list)
xh size > 0
{
size = size - 1
s dx = jo.dx(list, size)
//获取id
s id = jo.hq(dx, "id")
//获取name
s name = jo.hq(dx, "name")
//获取age
s age = jo.hq(dx, "age")
}