知识卡片

操作参考卡 · 5184

读取CJ控件

理解等级:中级

CJ把响应按Collection+JSON结构解释,可分别取METADATA、LINKS、ITEMS、QUERIES、TEMPLATE与ERROR。CJ REL <name>等按标识取单节点,复数命令取列表。先选择查询或写入模板再构造请求,能保留格式定义的动作信息;它不等同于对任意JSON数组作统一猜测。

这张卡片看不懂?

已有反馈 · 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

    参考来源

    - 位置:《RESTful Web API Patterns and Practices Cookbook》Appendix D. Using the HyperCLI(来源项目book-sources,源文件:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/app04.xhtml) - 结论依据:原文直接给出相应职责、操作或比较;本卡保留其用途与适用边界,不将历史接口表述当作当前工具验证。 - 原始内容: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