Skip to content

Commit eac7755

Browse files
authored
until the thousand years were finished
But the rest of the dead lived not again until the thousand years were finished. This is the first resurrection. (Revelation 20:5)
1 parent b779c1d commit eac7755

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
//But the rest of the dead lived not again until the thousand years were finished. This is the first resurrection. (Revelation 20:5)
3+
4+
package com.javarush.task.task33.task3305;
5+
6+
public class Car extends Auto {
7+
}
8+
9+
/*
10+
Конвертация из одного класса в другой используя JSON
11+
12+
НЕОБХОДИМО: подключенные библиотеки Jackson Core, Bind и Annotation версии 2.6.1
13+
14+
15+
16+
Расставь JSON аннотации так, чтобы результат выполнения метода main был следующим:
17+
18+
{
19+
20+
"className" : ".Parking",
21+
22+
"name" : "Super Parking",
23+
24+
"city" : "Kyiv",
25+
26+
"autos" : [ {
27+
28+
"className" : "com.javarush.task.task33.task3305.RaceBike",
29+
30+
"name" : "Simba",
31+
32+
"owner" : "Peter",
33+
34+
"age" : 2
35+
36+
}, {
37+
38+
"className" : "com.javarush.task.task33.task3305.Motorbike",
39+
40+
"name" : "Manny",
41+
42+
"owner" : null
43+
44+
}, {
45+
46+
"className" : "com.javarush.task.task33.task3305.Car"
47+
48+
} ]
49+
50+
}
51+
52+
53+
54+
Подсказка: это всего два класса.
55+
56+
57+
58+
59+
60+
Требования:
61+
62+
1. Вывод на экран должен соответствовать условию задачи.
63+
64+
2. Класс Parking должен быть отмечен аннотацией @JsonTypeInfo с подходящим набором параметров.
65+
66+
3. Класс Auto должен быть отмечен аннотацией @JsonTypeInfo с подходящим набором параметров.
67+
68+
4. Класс Auto должен быть отмечен аннотацией @JsonSubTypes с подходящим набором параметров.
69+
*/

0 commit comments

Comments
 (0)