Gson is unable to serialise Kotlin subclass which overrides fields.
Open
enhancement
kotlin
- Dominant language
- Java
- Stars
- 24.2k
- Forks
- 4.5k
- Avg merge
- 6d 4h
- Merged PRs (30d)
- 12
Description
# Problem solved by the feature
Gson will be able to easily serialise subclasses with overridden fields.
# Feature description
Gson is unable to serialise Kotlin subclass which overrides **fields** gives error **multiple JSON fields named**. Gson should ignore the parents value when a value gets overridden. Use childs name and value when serializing.
# Alternatives / workarounds
Use transient keyword either in parent or child class.
Contributor guide
Assessment
This issue has not been assessed yet.