This release contains all features and bugfixes from 1.6.0-RC plus some bugfixes on its own (see below).
Kotlin 1.9.0 is used as a default, while 1.9.10 is also supported.
Mark @SerialName, @Required and @Transient with @MustBeDocumented (#2407)
Ensure that no additional files except java compiler output get into multi-release jar (#2405)
Fix enums with negative numbers in protobuf not serializing & de-serializing (#2400) (thanks to Doğaç Eldenk)
1.6.0-RC
This release is based on the Kotlin 1.9.0.
Removal of Legacy JS target
Some time ago, in Kotlin 1.8, JS IR compiler was promoted to stable and old JS compiler was deprecated.
Kotlin 1.9 promotes the usage of deprecated JS compiler to an error. As a result, kotlinx.serialization no longer builds with the legacy compiler and does not distribute artifacts for it. You can read the migration guide for JS IR compiler here.
Also pay attention to the fact that Kotlin/Native also has some deprecated targets that are going to be removed in the Kotlin 1.9.20. Therefore, kotlinx.serialization 1.6.0-RC and 1.6.0 are likely the last releases that support these targets.
Case insensitivity for enums in Json
This release features a new configuration flag for Json: decodeEnumsCaseInsensitive that allows you to decode enum values in a case-insensitive manner.
For example, when decoding enum class Foo { VALUE_A , VALUE_B} both inputs "value_a" and "value_A" will yield Foo.VALUE_A. You can read more about this feature in the documentation and corresponding PR.
Other bugfixes and enhancements
Add support to decode numeric literals containing an exponent (#2227) (thanks to Roberto Blázquez)
Fix NoSuchMethodError related to Java 8 API compatibility (#2328, #2350) (thanks to Björn Kautler)
Changed actual FormatLanguage annotation for JS and Native to avoid problems with duplicating org.intellij.lang.annotations.Language (#2390, #2379)
Fix error triggered by 'consume leading class discriminator' polymorphic parsing optimization (#2362)
Fix runtime error with Serializer for Nothing on the JS target (#2330) (thanks to Shreck Ye)
Fix beginStructure in JsonTreeDecoder when inner structure descriptor is same as outer (#2346) (thanks to Ugljesa Jovanovic)
Actualize 'serializer not found' platform-specific message (#2339)
Fixed regression with serialization using a list parametrized with contextual types (#2331)
1.5.1
This release contains an important Native targets overhaul, as well as numerous enhancements and bugfixes.
Kotlin 1.8.21 is used by default.
New set of Native targets
The official Kotlin target support policy has recently been published describing new target policy: each target belongs to a certain tier, and different tiers have different stability guarantees. The official recommendation for library authors is to support targets up to Tier 3, and kotlinx.serialization now follows it. It means that in this release, there are a lot of new targets added from this tier, such as androidNativeX86 or watchosDeviceArm64. Note that since they belong to Tier 3, they're not auto-tested on CI.
kotlinx.serialization also ships some deprecated Kotlin/Native targets that do not belong to any tier (e.g. iosArm32, mingwX86).
We'll continue to release them, but we do not provide support for them, nor do we plan to add new targets from the deprecated list.
Improvements in Json elements
There are two new function sets that should make creating raw Json elements easier.
This release contains all features and bugfixes from 1.6.0-RC plus some bugfixes on its own (see below).
Kotlin 1.9.0 is used as a default, while 1.9.10 is also supported.
Ensure that no additional files except java compiler output get into multi-release jar (#2405)
Fix enums with negative numbers in protobuf not serializing & de-serializing (#2400) (thanks to Doğaç Eldenk)
1.6.0-RC / 2023-08-03
This release is based on the Kotlin 1.9.0.
Removal of Legacy JS target
Some time ago, in Kotlin 1.8, JS IR compiler was promoted to stable and old JS compiler was deprecated.
Kotlin 1.9 promotes the usage of deprecated JS compiler to an error. As a result, kotlinx.serialization no longer builds with the legacy compiler
and does not distribute artifacts for it. You can read the migration guide for JS IR compiler here.
Also pay attention to the fact that Kotlin/Native also has some deprecated targets
that are going to be removed in the Kotlin 1.9.20. Therefore, kotlinx.serialization 1.6.0-RC and 1.6.0 are likely the last releases that support these targets.
Case insensitivity for enums in Json
This release features a new configuration flag for Json: decodeEnumsCaseInsensitive
that allows you to decode enum values in a case-insensitive manner.
For example, when decoding enum class Foo { VALUE_A , VALUE_B} both inputs "value_a" and "value_A" will yield Foo.VALUE_A.
You can read more about this feature in the documentation and corresponding PR.
Other bugfixes and enhancements
Add support to decode numeric literals containing an exponent (#2227) (thanks to Roberto Blázquez)
Fix NoSuchMethodError related to Java 8 API compatibility (#2328, #2350) (thanks to Björn Kautler)
Changed actual FormatLanguage annotation for JS and Native to avoid problems with duplicating org.intellij.lang.annotations.Language (#2390, #2379)
Fix error triggered by 'consume leading class discriminator' polymorphic parsing optimization (#2362)
Fix runtime error with Serializer for Nothing on the JS target (#2330) (thanks to Shreck Ye)
Fix beginStructure in JsonTreeDecoder when inner structure descriptor is same as outer (#2346) (thanks to Ugljesa Jovanovic)
Actualize 'serializer not found' platform-specific message (#2339)
Fixed regression with serialization using a list parametrized with contextual types (#2331)
1.5.1 / 2023-05-11
This release contains an important Native targets overhaul, as well as numerous enhancements and bugfixes.
Kotlin 1.8.21 is used by default.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps org.jetbrains.kotlinx:kotlinx-serialization-cbor from 1.4.1 to 1.6.0.
Release notes
Sourced from org.jetbrains.kotlinx:kotlinx-serialization-cbor's releases.
... (truncated)
Changelog
Sourced from org.jetbrains.kotlinx:kotlinx-serialization-cbor's changelog.
... (truncated)
Commits
8baa04b
Prepare 1.6.0 release (#2414)79867f1
Merge remote-tracking branch 'origin/master' into dev77af2c9
Fix incorrect descriptor in advanced JsonDecoder/Encoder example (#2415)ef923de
Merge remote-tracking branch 'origin/master' into deva7109d8
Fix negative enums in protobuf not serializing & de-serializing (#2400)1e88d42
Rename JsonLexer.kt file to avoid confusion — we do not have this class anymo...e55f807
Test & fix several exception messages from Json parser7bf105e
Mark@SerialName
,@Required
and@Transient
with@MustBeDocumented
(#2407)e68f08e
Use JavaCompile.destinationDirectory instead of the whole task (#2405)ed1b057
Update Knit to 0.5.0-Beta (#2402)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show