Upload
anton-derevyanko
View
33
Download
0
Embed Size (px)
DESCRIPTION
Method for parsing dynamic entities for Android development (using Gson)
Citation preview
Deserialise dynamic entities with GSON
Jedi-way
Anton Derevyanko
The problem
Android + Gson + backend with dynamic entities
Dynamic entity?
Sith-way
Parse it manually!
Jedi-way
Create
parent class + type-specific children
Implement JsonDeserializer<T>
Parent class and childrenBase class:
Child class:
Write custom deserialiser:
Use it: