Skip to content

A simple Gson polymorphism serialization and deserialization example by using TypeAdapterFactory.

License

Notifications You must be signed in to change notification settings

dyhe83/Gson-Polymorphism-Example

Repository files navigation

Gson-Polymorphism-Example

Java8 build

  • A simple Gson polymorphism serialization and deserialization example by using TypeAdapterFactory.
  • Modified from stack overflow

How to use

$ git clone https://github.com/dyhe83/Gson-Polymorphism-Example.git --depth=1
$ cd Gson-Polymorphism-Example
$ ./gradlew run

[Animal]
Numbers of foot = 0

[Bird]
Numbers of foot = 2
Numbers of eye  = 2

[Cat]
Numbers of foot = 4
Numbers of tail = 1

About

A simple Gson polymorphism serialization and deserialization example by using TypeAdapterFactory.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages