-
Notifications
You must be signed in to change notification settings - Fork 5
GsonExtensions
Birju Vachhani edited this page Sep 25, 2019
·
4 revisions
Gson uses serialization and deserialization to clone objects. So Any property that can't be serialized or outside of gson's scope won't be cloned.
val car = Car()
val car2 = car.createClone()
val list = ArrayList<Car>()
val newList = list.createClone()
For more information, look at the GsonExtensions.kt file.
Here are the available Class Extensions: