14
タスク
Java Collections, レベル 3, レッスン 5
My first serialization into JSON
REQUIRED CONNECTED LIBRARIES: Jackson Core, Bind and Annotation 2.6.1
1) The program does not fulfill the main requirement for serialization into JSON.
Find the bug and fix it.
2) Correctly arrange the JSON annotations on the classes.
All the data must be serialized.
8
タスク
Java Collections, レベル 3, レッスン 5
My second serialization into JSON
REQUIRED CONNECTED LIBRARIES: Jackson Core, Bind and Annotation 2.6.1
Add JSON annotations so that the main method produces the following:
{"wildAnimal":"Missy","over":3}
14
タスク
Java Collections, レベル 3, レッスン 5
Deserializing a JSON object
REQUIRED CONNECTED LIBRARIES: Jackson Core, Bind and Annotation 2.6.1
In the convertFromJsonToNormal method, the first parameter is the name of a file that contains one JSON object.
The second parameter is the name of the class of the object serialized in the file.
14
タスク
Java Collections, レベル 3, レッスン 5
Using JSON to convert from one class to another
REQUIRED CONNECTED LIBRARIES: Jackson Core, Bind and Annotation 2.6.1
Two classes have the same fields, but they don't have a common superclass. Example, First and Second classes.
Implement the convertOneToAnother method, which should return an instance of the resultClassObject class.
14
タスク
Java Collections, レベル 3, レッスン 5
Using JSON to convert from one class to another
REQUIRED CONNECTED LIBRARIES: Jackson Core, Bind and Annotation 2.8.1
Add JSON annotations so that the main method.
14
タスク
Java Collections, レベル 3, レッスン 5
Strange mistake
REQUIRED CONNECTED LIBRARIES: Jackson Core, Bind and Annotation 2.6.1
Running the code in the Solution class's main method results in a strange error
during JSON serialization/deserialization. The sampleJsonString string should be displayed,
but that's not exactly what happens.
14
タスク
Java Collections, レベル 3, レッスン 5
Serializing a zoo
Make it so that a type is added to each element of the animals list when you serialize a Zoo object (dog for the Dog class, cat for the Cat class).
To check, you can use the Solution class's main method.
Before:
{"animals":[{"name":"doggy","barkVolume":0.0},{"name":"catty","lives":0}]}.
8
タスク
Java Collections, レベル 3, レッスン 5
Serializing a date into JSON
Using the JsonFormat annotation, make it so the Event class's field containing a date is serialized
in the format (dd-MM-yyyy hh:mm:ss).