forked from SWI-Prolog/packages-http
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjson.txt
30 lines (25 loc) · 1.3 KB
/
json.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---+ [jsonsupport] Supporting JSON
From http://json.org, "
JSON (JavaScript Object Notation) is a lightweight data-interchange
format. It is easy for humans to read and write. It is easy for machines
to parse and generate. It is based on a subset of the JavaScript
Programming Language, Standard ECMA-262 3rd Edition - December 1999.
JSON is a text format that is completely language independent but uses
conventions that are familiar to programmers of the C-family of
languages, including C, C++, C#, Java, JavaScript, Perl, Python, and
many others. These properties make JSON an ideal data-interchange
language."
JSON is interesting to Prolog because using AJAX web technology we can
easily created web-enabled user interfaces where we implement the server
side using the SWI-Prolog HTTP services provided by this package.
The interface consists of three libraries:
* library(http/json) provides support for the core JSON object
serialization.
* library(http/json_convert) converts between the primary
representation of JSON terms in Prolog and more application
oriented Prolog terms. E.g. point(X,Y) vs. object([x=X,y=Y]).
* library(http/http_json) hooks the conversion libraries into
the HTTP client and server libraries.
[[json.pl]]
[[json_convert.pl]]
[[http_json.pl]]