tests: Test result update for `curl_http`
[nit.git] / tests / sav / nitce / test_json_deserialization_alt3.res
1 # Nit:
2 <A: true a 0.123 1234 asdf false p4ssw0rd>
3
4 # Json:
5 {
6         "__kind": "obj", "__id": 0, "__class": "A",
7         "b": true,
8         "c": {"__kind": "char", "__val": "a"},
9         "f": 0.123,
10         "i": 1234,
11         "serialization_specific_name": "asdf",
12         "n": null
13 }
14
15 # Back in Nit:
16 <A: true a 0.123 1234 asdf false p4ssw0rd>
17
18 # Nit:
19 <B: <A: false b 123.123 2345 hjkl true p4ssw0rd> 1111 qwer>
20
21 # Json:
22 {
23         "__kind": "obj", "__id": 0, "__class": "B",
24         "b": false,
25         "c": {"__kind": "char", "__val": "b"},
26         "f": 123.123,
27         "i": 2345,
28         "serialization_specific_name": "hjkl",
29         "n": 12,
30         "ii": 1111,
31         "ss": "qwer"
32 }
33
34 # Back in Nit:
35 <B: <A: false b 123.123 2345 hjkl true p4ssw0rd> 1111 qwer>
36
37 # Nit:
38 <C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl true p4ssw0rd> 1111 qwer>>
39
40 # Json:
41 {
42         "__kind": "obj", "__id": 0, "__class": "C",
43         "a": {
44                 "__kind": "obj", "__id": 1, "__class": "A",
45                 "b": true,
46                 "c": {"__kind": "char", "__val": "a"},
47                 "f": 0.123,
48                 "i": 1234,
49                 "serialization_specific_name": "asdf",
50                 "n": null
51         },
52         "b": {
53                 "__kind": "obj", "__id": 2, "__class": "B",
54                 "b": false,
55                 "c": {"__kind": "char", "__val": "b"},
56                 "f": 123.123,
57                 "i": 2345,
58                 "serialization_specific_name": "hjkl",
59                 "n": 12,
60                 "ii": 1111,
61                 "ss": "qwer"
62         },
63         "aa": {
64                 "__kind": "ref", "__id": 1
65         }
66 }
67
68 # Back in Nit:
69 <C: <A: true a 0.123 1234 asdf false p4ssw0rd> <B: <A: false b 123.123 2345 hjkl true p4ssw0rd> 1111 qwer>>
70
71 # Nit:
72 <D: <B: <A: false b 123.123 2345 new line ->
73 <- false p4ssw0rd> 1111         f"\r\/> true>
74
75 # Json:
76 {
77         "__kind": "obj", "__id": 0, "__class": "D",
78         "b": false,
79         "c": {"__kind": "char", "__val": "b"},
80         "f": 123.123,
81         "i": 2345,
82         "serialization_specific_name": "new line ->\n<-",
83         "n": null,
84         "ii": 1111,
85         "ss": "\tf\"\r\\/",
86         "d": {
87                 "__kind": "ref", "__id": 0
88         }
89 }
90
91 # Back in Nit:
92 <D: <B: <A: false b 123.123 2345 new line ->
93 <- false p4ssw0rd> 1111         f"\r\/> true>
94
95 # Nit:
96 <E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
97
98 # Json:
99 {
100         "__kind": "obj", "__id": 0, "__class": "E",
101         "a": {
102                 "__kind": "obj", "__id": 1, "__class": "Array",
103                 "__items": ["hello", 1234, 123.4]
104         },
105         "b": {
106                 "__kind": "obj", "__id": 2, "__class": "Array",
107                 "__items": ["hella", 2345, 234.5]
108         }
109 }
110
111 # Back in Nit:
112 <E: a: hello, 1234, 123.4; b: hella, 2345, 234.5>
113
114 Deserialization Error: Doesn't know how to deserialize class "Array"
115 Deserialization Error: Wrong type on `E::a` expected `Array[Object]`, got `null`
116 Deserialization Error: Doesn't know how to deserialize class "Array"
117 Deserialization Error: Wrong type on `E::b` expected `Array[nullable Serializable]`, got `null`
118 # Nit:
119 <F: 2222>
120
121 # Json:
122 {
123         "__kind": "obj", "__id": 0, "__class": "F",
124         "n": 2222
125 }
126
127 # Back in Nit:
128 null
129
130 Deserialization Error: Doesn't know how to deserialize class "F"
131 # Nit:
132 <F: 33.33>
133
134 # Json:
135 {
136         "__kind": "obj", "__id": 0, "__class": "F",
137         "n": 33.33
138 }
139
140 # Back in Nit:
141 null
142
143 Deserialization Error: Doesn't know how to deserialize class "F"
144 # Nit:
145 <G: hs: -1, 0; s: one, two; hm: one. 1, two. 2; am: three. 3, four. 4>
146
147 # Json:
148 {
149         "__kind": "obj", "__id": 0, "__class": "G",
150         "hs": {
151                 "__kind": "obj", "__id": 1, "__class": "HashSet",
152                 "__items": [-1, 0]
153         },
154         "s": {
155                 "__kind": "obj", "__id": 2, "__class": "ArraySet",
156                 "__items": ["one", "two"]
157         },
158         "hm": {
159                 "__kind": "obj", "__id": 3, "__class": "HashMap", "__length": 2,
160                 "__keys": ["one", "two"],
161                 "__values": [1, 2]
162         },
163         "am": {
164                 "__kind": "obj", "__id": 4, "__class": "ArrayMap", "__length": 2,
165                 "__keys": ["three", "four"],
166                 "__values": ["3", "4"]
167         }
168 }
169
170 # Back in Nit:
171 <G: hs: ; s: ; hm: ; am: >
172
173 Deserialization Error: Doesn't know how to deserialize class "HashSet"
174 Deserialization Error: Wrong type on `G::hs` expected `HashSet[Int]`, got `null`
175 Deserialization Error: Doesn't know how to deserialize class "ArraySet"
176 Deserialization Error: Wrong type on `G::s` expected `Set[String]`, got `null`
177 Deserialization Error: Doesn't know how to deserialize class "HashMap"
178 Deserialization Error: Wrong type on `G::hm` expected `HashMap[String, Int]`, got `null`
179 Deserialization Error: Doesn't know how to deserialize class "ArrayMap"
180 Deserialization Error: Wrong type on `G::am` expected `ArrayMap[String, String]`, got `null`