Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Convenience module to convert a prolog query into a JSON answer |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.3 |
SHA1 sum: | d3a54c604bc5655806a1e7c43afe6caa97a00a38 |
Author: | Risto Stevcev <risto1@gmail.com> |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.3 | d3a54c604bc5655806a1e7c43afe6caa97a00a38 | 8 | https://github.com/Risto-Stevcev/json_answer.git |
0.2 | 8e6ceea50dc33aceb5d89a8ad7c4b1230ae5d965 | 1 | https://github.com/Risto-Stevcev/json_answer.git |
f56c84cfaffa6a99b15b72d1de5a0b475f6f25ae | 3 | https://github.com/Risto-Stevcev/json_answer.git | |
0.1 | dc3188516c1087fc619e789ba3fbeed7c773b023 | 3 | https://github.com/Risto-Stevcev/json_answer.git |
Convenience module to convert a prolog query into a JSON answer for IPC.
This is useful for interop with prolog and another language.
$ swipl -f prolog/json_answer.pl \ -g 'assert(foo(bar, baz))' -g 'assert(foo(bar, qux))' \ -g 'term_to_dict_list(foo(bar,_), D), json:json_write_dict(current_output, D)' \ -g halt [ {"foo": ["bar", "baz" ]}, {"foo": ["bar", "qux" ]} ]
See LICENSE
Pack contains 6 files holding a total of 6.1K bytes.