知识卡片
读取CJ控件
CJ把响应按Collection+JSON结构解释,可分别取METADATA、LINKS、ITEMS、QUERIES、TEMPLATE与ERROR。CJ REL <name>等按标识取单节点,复数命令取列表。先选择查询或写入模板再构造请求,能保留格式定义的动作信息;它不等同于对任意JSON数组作统一猜测。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 附录D:HyperCLI操作参考 · 查看原书依据
CJ Returns a strong-typed version of response from top of the stack (vnd.collection+json) .. METADATA Returns metadata array from a Collection+JSON response .. LINKS Returns links array from a Collection+JSON response .. ITEMS Returns items array from a Collection+JSON response .. QUERIES Returns queries array from a Collection+JSON response .. TEMPLATE Returns template collection from a Collection+JSON response .. ERRORǀERRORS Returns error object from a Collection+JSON response .. RELATED Returns the related object from a Collection+JSON response .. IDǀNAMEǀRELǀTAG <stringǀ$#> Returns a single node .. IDSǀRELSǀNAMESǀTAGS Returns a simple list .. PATH <JSONPathǀ$#> Returns results of a JSONPath query from a Collection+JSON response