如何在Delphi中解析JSON字符串?
解析 JSON 字符串
{"data":{"results":[{"Branch":"ACCT590003"}]}}
如何使用 TJSONObject
目的?我想从此字符串获取 ACCT590003
值。
How can I parse the JSON string
{"data":{"results":[{"Branch":"ACCT590003"}]}}
using the TJSONObject
object? I want to get the ACCT590003
value from this string.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您不需要使用外部库来执行 JSONPath 搜索。
以 Delphi 10 西雅图为例:
You don't need to use external libraries to perform a JSONPath search.
Example with Delphi 10 Seattle:
试试这个代码,它工作正常
Branch = 'ACCT590003'
Try this code, it works fine
Branch = 'ACCT590003'
使用 SuperObject 库 https://github.com/hgourvest/superobject/
Using SuperObject Library https://github.com/hgourvest/superobject/
使用 TALdocument 很容易
using TALdocument it's easy