summaryrefslogtreecommitdiff
path: root/man/6
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2007-01-22 19:56:53 +0000
committerCharles.Forsyth <devnull@localhost>2007-01-22 19:56:53 +0000
commitee1a8f4a2601560b3563fa4bd92075ac2883fb06 (patch)
tree4025e65d87c4ac8c0b6127672ec07177337792c9 /man/6
parent66b2b912b077b69e3f038939d3512927ac220344 (diff)
add json
Diffstat (limited to 'man/6')
-rw-r--r--man/6/INDEX1
-rw-r--r--man/6/json68
-rw-r--r--man/6/sexprs4
-rw-r--r--man/6/ubfa2
4 files changed, 73 insertions, 2 deletions
diff --git a/man/6/INDEX b/man/6/INDEX
index 8627fab0..cdbaa344 100644
--- a/man/6/INDEX
+++ b/man/6/INDEX
@@ -7,6 +7,7 @@ dis dis
font font
subfont font
image image
+json json
keyboard keyboard
keys keys
keytext keytext
diff --git a/man/6/json b/man/6/json
new file mode 100644
index 00000000..6724e379
--- /dev/null
+++ b/man/6/json
@@ -0,0 +1,68 @@
+.TH JSON 6
+.SH NAME
+json \- javascript object notation
+.SH DESCRIPTION
+.I JSON
+is a textual data transport encoding for a small collection of basic and structured values:
+.BR null ,
+booleans, numbers, strings, arrays, and objects (property/value list).
+It is a subset of JavaScript (ECMAScript).
+.IR Json (2)
+describes a Limbo module that can read and write streams of JSON-encoded data.
+.PP
+The encoding syntax and its interpretation is defined by Internet RFC4627, but is briefly summarised here:
+.IP
+.EX
+.ft R
+.ta \w'\f2simple-xxx\f1'u +\w'\ ::=\ 'u
+\f2text\fP ::= \f2array\fP | \f2object\fP
+
+\f2value\fP ::= \f5null\fP | \f5true\fP | \f5false\fP | \f2number\fP | \f2string\fP | \f2array\fP | \f2object\fP
+
+\f2object\fP ::= \f5'{'\fP [\f2pair\fP (\f5','\fP \f2pair\fP)*] \f5'}'\fP
+\f2pair\fP ::= \f2string\fP \f5':'\fP \f2value\fP
+
+\f2array\fP ::= \f5'['\fP [\f2value\fP (\f5','\fP \f2value\fP)*] \f5']'\fP
+
+\f2number\fP ::= \f2int\fP \f2frac\fP? \f2exp\fP?
+\f2int\fP ::= \f5'-'\fP? \f5[0-9]\fP | \f5[1-9][0-9]\fP+
+\f2frac\fP ::= \f5'.'\fP \f5[0-9]\fP+
+\f2exp\fP ::= \f5[eE][-+]\fP? \f5[0-9]\fP+
+
+\f2string\fP ::= \f5'"'\fP \f2char\fP* \f5'"'\fP
+\f2char\fP ::= \f5[^\ex00-\ex1F"\e\e]\fP |
+ \f5'\e"'\fP | \f5'\e/'\fP | \f5'\eb'\fP | \f5'\ef'\fP | \f5'\en'\fP | \f5'\er'\fP | \f5'\et'\fP |
+ \f5'\eu'\fP \f2hex\fP \f2hex\fP \f2hex\fP \f2hex\fP
+\f2hex\fP ::= \f5[0-9a-fA-F]\fP
+.EE
+.PD
+.DT
+.PP
+A sequence of blank, tab, newline or carriage-return characters (`white space') can appear
+before or after opening and closing brackets and braces, colons and commas,
+and is ignored.
+The
+.B null
+represents a null value of any type.
+The
+.I strings
+in the
+.I pairs
+of an
+.I object
+are intended to represent member names, and should be unique within that object.
+Note that array and object denotations can be empty.
+Also note that the RFC wants applications to exchange a
+.I text
+(ie, object or array) not an arbitrary
+.IR value .
+.SH SEE ALSO
+.IR json (2),
+.IR sexprs (6),
+.IR ubfa (6)
+.br
+.br
+D Crockford, ``The application/json Media Type for JavaScript Object Notation (JSON)'',
+.IR RFC4627 .
+UBF web page,
+.B "http://www.sics.se/~joe/ubf/"
diff --git a/man/6/sexprs b/man/6/sexprs
index d2a5a7cc..11d3d790 100644
--- a/man/6/sexprs
+++ b/man/6/sexprs
@@ -228,7 +228,9 @@ The following is an S-expression in advanced form:
Note that advanced form contains canonical form as a subset;
here it is used for the innermost list.
.SH SEE ALSO
-.IR sexprs (2)
+.IR sexprs (2),
+.IR json (6),
+.IR ubfa (6)
.PP
R. Rivest, ``S-expressions'', Network Working Group Internet Draft
(4 May 1997),
diff --git a/man/6/ubfa b/man/6/ubfa
index 61b5705d..31e9bd1a 100644
--- a/man/6/ubfa
+++ b/man/6/ubfa
@@ -117,8 +117,8 @@ Applications using UBF(A) typically take turns to exchange
.I input
values on a communication channel.
.SH SEE ALSO
-.IR sexprs (2),
.IR ubfa (2),
+.IR json (6),
.IR sexprs (6)
.br
J L Armstrong, ``Getting Erlang to talk to the outside world'',