易语言带数组json的编写方法

案例json:
{"op":"subscribe","args":[{ "channel": "tickers", "instId": "123" },{ "channel": "tickers", "instId": "456" },{ "channel": "tickers", "instId": "789" }]}

 

编写方法:

.版本 2
.支持库 spec

.子程序 _启动子程序, 整数型, , 本子程序在程序启动后最先执行

Json ()
返回 (0) ' 可以根据您的需要返回任意数值

.子程序 Json
.局部变量 Json, 类_json
.局部变量 Json1, 类_json

Json.置属性 (“op”, “subscribe”, )

Json1.置属性 (“channel”, “tickers”, )
Json1.置属性 (“instId”, “123”, )
Json.加成员 (Json1.取数据文本 (), “args”, 真, )

Json1.置属性 (“channel”, “tickers”, )
Json1.置属性 (“instId”, “456”, )
Json.加成员 (Json1.取数据文本 (), “args”, 真, )

Json1.置属性 (“channel”, “tickers”, )
Json1.置属性 (“instId”, “789”, )
Json.加成员 (Json1.取数据文本 (), “args”, 真, )

调试输出 (Json.取数据文本 ())

 

posted @   洪雨  阅读(395)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端

友情链接

红尘修行笔记|钱度众生
点击右上角即可分享
微信分享提示