Newer
Older
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
module JSON {
// JSON Number type (generic)
type float Number (!-infinity .. !infinity) /*with {
variant "JSON:number"
}*/
// Integer type
type integer Integer (-infinity .. infinity) /*with {
variant "JSON:integer"
}*/
// String type
type universal charstring String /*with {
variant "JSON:string"
}*/
type universal charstring Date /*with {
variant "JSON:date"
}*/
// Array type
/*type record of JSON.Values Array with {
variant "JSON:array"
}*/
// Subsidiary array types
type record of JSON.String StrArray /*with {
variant "JSON:array"
}*/
type record of JSON.Number NumArray /*with {
variant "JSON:array"
}*/
type record of JSON.Integer IntArray /*with {
variant "JSON:array"
}
type record of JSON.Bool BoolArray with {
variant "JSON:array"
}
type record of JSON.Object ObjArray with {
variant "JSON:array"
}*/
// Object member
/*type record ObjectMember {
JSON.String name,
JSON.Values value_
} with {
variant "JSON:objectMember"
}*/
// Generic JSON object type
/*type record Object {
record length (1..infinity) of JSON.ObjectMember memberList optional
} with {
variant "JSON:object"
}
type union Values {
JSON.String str,
JSON.Number num,
JSON.Integer int,
JSON.Object object,
JSON.Array array,
JSON.StrArray strArray,
JSON.NumArray numArray,
JSON.IntArray intArray,
JSON.BoolArray boolArray,
JSON.ObjArray objArray,
JSON.Bool bool,
JSON.Null null_
} with {
variant "asValue"
}*/
//JSON literals
//When only the true and false literals are allowed
type boolean Bool /*with { variant "JSON:literal" }*/
//When only the null literal is allowed
type enumerated Null { null_ }; /*with { variant "JSON:literal" }*/
} // End of module JSON