Skip to content

2.3.0

Compare
Choose a tag to compare
@ansman ansman released this 07 Oct 14:48

🚨 Breaking 🚨

This version contains a breaking behavior change. Polymorphic hierarchies (sealed classes) now emit the polymorphic label automatically. This was an oversight and could be considered a bug.

It will affect you if you are writing classes annotated with @Polymorphic/@PolymorphicLabel.
If you have only read such classes you are unaffected by this change

Thank you @madisp for contributing this fix (#147).

Improvements

The JsonReader.Options is not placed inside the adapter itself rather than in a companion object. This will lead to fewer objects being generated a less memory used if adapters aren't long lived. The trade off is that it's duplicated for each adapter but since the number of duplicate adapters is likely low it's not expected to have any real impact.

The size of the generated code has also been reduced.