kotlinx.serialization
kotlinx.serialization copied to clipboard
Ignore unknown keys per class / via annotation
What is your use-case and why do you need this feature?
I know keys can be ignored "globally" on the JSON builder scope. But for safely, and to better document which classes have been implemented completely and which not, I'd prefer to ignore unknown keys per class only.
Describe the solution you'd like
I'd prefer an annotation-based solution, similar to Jackson's @JsonIgnoreProperties(ignoreUnknown = true) annotation.
any update?
Its very critial for scalability.
Yeah there are many major APIs were forced to use which version their API contracts publicly but still randomly permute certain sub objects.