Simple Example of JSON with GSON and JsonDeserializer

preview_player
Показать описание
Create JSON from Java objects and store the JSON into a file. I use Gson, GsonBuilder, JsonSerializer,JsonDeserializer, TypeToken, PrintWriter, Stream, BufferedStream, and a set of Java DTOs that I want to use to create JSON. First I write the objects to a file, then I read the file and create objects from the JSON data.

Рекомендации по теме
Комментарии
Автор

Thank you very much. Today I finally finished watching all the videos and following along coding.

Hope this helps me in my career. There is an OOP-shaped in my soul. :P

I think gonna give another try to your Jetpack Compose tutorial.

Now, onto that final git commit. Thank you.

PurpleWarlock
Автор

Good and explanatory video, the only issue I find, or Maybe I got wrong, is that when deserializing, for example, if I want to use that deserializer in a list of classes, lest say, [Bananas, Apples and Fruit] where Apples and Bananas Inherit from fruit, the usage of the will create a Loop, since the list containing Fruit, and we are doing a call to deserialize a Fruit inside our Fruit Deserializer. But, afar from that, stills being an excellent tutorial

airman
Автор

How to parse JSON if an element is coming as jsonobject sometime and jsonarray sometime

jaasist