Created
July 6, 2018 20:04
-
-
Save ninjarobot/d397b80b6072fd8deffe9bafd68b76e0 to your computer and use it in GitHub Desktop.
Parsing a JSON string in SWI-Prolog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
?- use_module(library(http/json_convert)). | |
true. | |
?- json:atom_json_term('{"foo":"bar"}',T, []), T=json(J), J.foo=Bar. | |
T = json([foo=bar]), | |
J = [foo=bar], | |
Bar = bar. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment