a1006992506a548d7029072a86b7b7844eec0c9e
[deliverable/titan.core.git] / regression_test / json / JsonData.asn
1 --*****************************************************************************
2 -- Copyright (c) 2000-2014 Ericsson Telecom AB
3 -- All rights reserved. This program and the accompanying materials
4 -- are made available under the terms of the Eclipse Public License v1.0
5 -- which accompanies this distribution, and is available at
6 -- http://www.eclipse.org/legal/epl-v10.html
7 --*****************************************************************************
8 JsonData
9 DEFINITIONS
10
11 AUTOMATIC TAGS
12
13 ::=
14
15 BEGIN
16
17 IMPORTS ;
18
19 -- Type definitions --
20 ----------------------
21
22 SeqOfInt ::= SEQUENCE OF INTEGER
23
24 SeqProduct ::= SEQUENCE {
25 name UniversalString,
26 price REAL,
27 id OCTET STRING OPTIONAL,
28 available BOOLEAN
29 }
30
31 Number ::= CHOICE {
32 decimal INTEGER,
33 binary BIT STRING,
34 hexadecimal OCTET STRING
35 }
36
37 AnyString ::= CHOICE {
38 generalstr GeneralString,
39 numericstr NumericString,
40 utf8str UTF8String,
41 printablestr PrintableString,
42 universalstr UniversalString,
43 bmpstr BMPString,
44 graphicstr GraphicString,
45 ia5str IA5String,
46 teletexstr TeletexString,
47 videotexstr VideotexString,
48 visiblestr VisibleString
49 }
50
51 ManyStrings ::= SEQUENCE OF AnyString
52
53 ComplexSet ::= SET {
54 product SeqProduct,
55 numbers SET OF Number,
56 strings ManyStrings
57 }
58
59 -- Values and their encoding --
60 -------------------------------
61
62 -- SeqOfInt
63 c-ints SeqOfInt ::= { 1, 3, 6 }
64
65 c-ints-str VisibleString ::= "[1,3,6]"
66
67 -- SeqProduct
68 c-product SeqProduct ::= {
69 name "TV",
70 price 250.0,
71 id '1D65'H,
72 available TRUE
73 }
74
75 c-product-str VisibleString ::= "{""name"":""TV"",""price"":250.000000,""id"":""1D65"",""available"":true}"
76
77 -- Number
78 c-number Number ::= binary : '1100'B
79
80 c-number-str VisibleString ::= "{""binary"":""1100""}"
81
82 -- ManyStrings
83 c-strings ManyStrings ::= {
84 generalstr : "General String <o",
85 numericstr : "1 457 664",
86 utf8str : "Doesn't actually contain non-ASCII characters",
87 printablestr : "hello",
88 universalstr : "not so universal, apparently",
89 bmpstr : "abc",
90 ia5str : "one two three",
91 teletexstr : "Let's just bug out and call it even, OK?!",
92 videotexstr : "abc123;.",
93 visiblestr : "invisible"
94 }
95
96 c-strings-str VisibleString ::= "[{""generalstr"":""General String <o""},{""numericstr"":""1 457 664""},{""utf8str"":""Doesn't actually contain non-ASCII characters""},{""printablestr"":""hello""},{""universalstr"":""not so universal, apparently""},{""bmpstr"":""abc""},{""ia5str"":""one two three""},{""teletexstr"":""Let's just bug out and call it even, OK?!""},{""videotexstr"":""abc123;.""},{""visiblestr"":""invisible""}]"
97
98 -- ComplexSet
99 c-set-val ComplexSet ::= {
100 product {
101 name "Headset",
102 price 28.5,
103 available FALSE
104 },
105 numbers {
106 hexadecimal : '16678D'H,
107 decimal : 12
108 },
109 strings {
110 printablestr : "first",
111 numericstr : "2"
112 }
113 }
114
115 c-set-val-str VisibleString ::= "{""product"":{""name"":""Headset"",""price"":28.500000,""available"":false},""numbers"":[{""hexadecimal"":""16678D""},{""decimal"":12}],""strings"":[{""printablestr"":""first""},{""numericstr"":""2""}]}"
116
117 END
This page took 0.048222 seconds and 4 git commands to generate.