Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 11 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
SWI-Prolog JSON 库中有一个使用示例来保存 JSON 选项
http://www.swi-prolog。 org/git/packages/http.git/blob/HEAD:/json.pl
使用起来非常简单。唯一的痛苦是您无法从记录中提取任意字段,因为它们需要由 _(X) 访问。另外,我不认为存储有关记录的任何额外元数据,以防您想在运行时获取字段名称。
There is one example of usage here in the SWI-Prolog JSON library to hold JSON options
http://www.swi-prolog.org/git/packages/http.git/blob/HEAD:/json.pl
It is pretty straightforward to use. the only pain is that you can't pull arbitrary fields off a record because they need to be accessed by _(X). Also, i do not believe any extra meta-data about the record is stored in case you want to get the field names at run time.