1SNOBOL4JSON(3)                  CSNOBOL4 Manual                 SNOBOL4JSON(3)
2
3
4

NAME

6       JSON Encoding and Decoding
7

SYNOPSYS

9           -INCLUDE 'json.sno'
10                 string = JSON_ENCODE(data)
11                 data = JSON_DECODE(string)
12

DESCRIPTION

14       JSON_ENCODE(data) accepts a subset of SNOBOL4 data types:
15
16STRING
17
18INTEGER
19
20REAL
21
22ARRAY MUST be singly-dimensioned and zero-based.
23
24TABLE
25
26       JSON_DECODE(json_string) accepts a proper subset of JSON with the
27       following limits and omissions:
28
29       •      arrays must have at least one item.
30
31       •       escapes can only be used for ASCII (00-7F) characters.
32
33true and false are not accepted.
34
35       NOTE!!! JSON is defined to use UTF-8 encoding, but this is not enforced
36       by this library.  To exchange binary data with other software which may
37       enforce use of only UTF-8 sequences, the binary strings should be
38       encoded (eg with base64) to ASCII sequences.
39

COMPATIBILITY

41       https://tools.ietf.org/html/rfc8259
42

SEE ALSO

44       snobol4(1), snobol4base64(3)
45

AUTHORS

47       Philip L. Budne
48
49
50
51CSNOBOL4B 2.3.1                 March 31, 2022                  SNOBOL4JSON(3)
Impressum