json()

阅读(739) 标签: json串, 记录, 解析,

描述:

解析json/记录/序表。

语法:

json(x)

备注:

xjson格式串时,将x解析成序表返回;当x是记录或序列时,解析成json格式串返回。

参数:

x

json/记录/序列

返回值:

序表/json

示例:

1

{name:'China',province:[{name:'HeiLongJiang',cities:

{city:['HaErBin','DaQing']}},{name:'GuangDong',

cities:{city:['GuangZhou','ShenZhen','ZhuHai']}},{name:'TaiWan',cities:

{city:['TaiBei','GaoXiong']}},{name:'XinJiang',cities:{city:['WuLuMuQi']}}]}

 

2

=json(A1)

 

A1json串,解析为序表返回:

 

3

=demo.query("select EID,NAME,SURNAME from EMPLOYEE")

4

=json(A3)

A3为序表记录,解析为json类型串返回: