知识卡片
按路径选择响应内容
SHOW PATH <JSONPath|XMLPath>或明确的JPATH、XPATH从响应栈顶提取数据;这与按link rel查找导航控件不同。路径适合已知表示内部结构的选择,结构改变可能使选择失效;应在结果缺失时检查表示与路径,而非把空结果直接当作远端业务事实。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 附录D:HyperCLI操作参考 · 查看原书依据
.. PATH <JSONPathǀXMLPathǀ$#> Returns results of a query (XML or JSON) from top-of-stack response .. JPATH <JSONPathǀ$#> Returns results of a JSONPath query from top-of-stack response .. XPATH <XMLPathǀ$#> Returns results of an XPath query from top-of-stack 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)
- 结论依据:原文直接给出相应职责、操作或比较;本卡保留其用途与适用边界,不将历史接口表述当作当前工具验证。
- 原始内容:.. PATH <JSONPathǀXMLPathǀ$#> Returns results of a query (XML or JSON) from top-of-stack response .. JPATH <JSONPathǀ$#> Returns results of a JSONPath query from top-of-stack response .. XPATH <XMLPathǀ$#> Returns results of an XPath query from top-of-stack response