bump <https://kotlinlang.slack.com/archives/C7A1U5PTM/p1658261294261379?thread_ts=1658261294.261379&...
l
If you add a new optional parameter, you should be guaranteed backward compatibility. You can also remove parameters that are no longer needed, and maintain backward compatibility, assuming the value is no longer needed and ignoreUnknownKeys is set to true.
Changing names or types will break backward compatibility (I’m not 100% sure on Number types. If I deserialize “10.5” as an Int, will it error, or will I get 10?)
c
You can use the official binary compatibility validator to ensure Kotlin code changes are backward-compatible
That’s for code validation. For validation of the serialized data, you might use an external tool to validate the JSON, such as JSON Schema, which doesn’t depend strictly on the compatibility of the Kotlin code. JSON Schema is an open standard, so is a good choice to adopt for that validation that doesn’t really tie you to any particular language or implementation