Sourced from org.jetbrains.kotlinx:kotlinx-serialization-json's releases.
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
androidNativeX86orwatchosDeviceArm64. 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. First one contains overloads for
JsonPrimitiveconstructor-like function that accept unsigned types:JsonPrimitive(1u). Second one adds newaddAllfunctions toJsonArrayBuilderto be used with collections of numbers, booleans or strings:buildJsonArray { addAll(listOf(1, 2, 3)) }. Both were contributed to us by aSemy.Other enhancements
- Potential source-breaking change: Rename json-okio
targetvariables tosink(https://github.com/facebook/flipper/issues/2226)- Function to retrieve KSerializer by KClass and type arguments serializers (https://github.com/facebook/flipper/issues/2291)
- Added FormatLanguage annotation to Json methods (https://github.com/facebook/flipper/issues/2234)
- Properties Format: Support sealed/polymorphic classes as class properties (https://github.com/facebook/flipper/issues/2255)
Bugfixes
- KeyValueSerializer: Fix missing call to endStructure() (https://github.com/facebook/flipper/issues/2272)
- ObjectSerializer: Respect sequential decoding (https://github.com/facebook/flipper/issues/2273)
- Fix value class encoding in various corner cases (https://github.com/facebook/flipper/issues/2242)
- Fix incorrect json decoding iterator's .hasNext() behavior on array-wrapped inputs (https://github.com/facebook/flipper/issues/2268)
- Fix memory leak caused by invalid KTypeWrapper's equals method (https://github.com/facebook/flipper/issues/2274)
- Fixed NoSuchMethodError when parsing a JSON stream on Java 8 (https://github.com/facebook/flipper/issues/2219)
- Fix MissingFieldException duplication (https://github.com/facebook/flipper/issues/2213)
1.5.0
This release contains all features and bugfixes from 1.5.0-RC plus some experimental features and bugfixes on its own (see below). Kotlin 1.8.10 is used as a default.
HoconEncoder and HoconDecoder interfaces and HOCON-specific serializers
These interfaces work in a way similar to
JsonEncoderandJsonDecoder: they allow intercepting (de)serialization process, making writing if custom HOCON-specific serializers easier. NewConfigMemorySizeSerializerandJavaDurationSerializeralready make use of them. See more details in the PR. Big thanks to Alexander Mikhailov for contributing this!Ability to read buffered huge strings in custom Json deserializers
New interface
ChunkedDecoderallows you to read huge strings that may not fit in memory by chunks. Currently, this interface is only implemented by Json decoder that works with strings and streams,
... (truncated)
Sourced from org.jetbrains.kotlinx:kotlinx-serialization-json's changelog.
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.
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
androidNativeX86orwatchosDeviceArm64. 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. First one contains overloads for
JsonPrimitiveconstructor-like function that accept unsigned types:JsonPrimitive(1u). Second one adds newaddAllfunctions toJsonArrayBuilderto be used with collections of numbers, booleans or strings:buildJsonArray { addAll(listOf(1, 2, 3)) }Both were contributed to us by aSemy.Other enhancements
- Potential source-breaking change: Rename json-okio
targetvariables tosink(https://github.com/facebook/flipper/issues/2226)- Function to retrieve KSerializer by KClass and type arguments serializers (https://github.com/facebook/flipper/issues/2291)
- Added FormatLanguage annotation to Json methods (https://github.com/facebook/flipper/issues/2234)
- Properties Format: Support sealed/polymorphic classes as class properties (https://github.com/facebook/flipper/issues/2255)
Bugfixes
- KeyValueSerializer: Fix missing call to endStructure() (https://github.com/facebook/flipper/issues/2272)
- ObjectSerializer: Respect sequential decoding (https://github.com/facebook/flipper/issues/2273)
- Fix value class encoding in various corner cases (https://github.com/facebook/flipper/issues/2242)
- Fix incorrect json decoding iterator's .hasNext() behavior on array-wrapped inputs (https://github.com/facebook/flipper/issues/2268)
- Fix memory leak caused by invalid KTypeWrapper's equals method (https://github.com/facebook/flipper/issues/2274)
- Fixed NoSuchMethodError when parsing a JSON stream on Java 8 (https://github.com/facebook/flipper/issues/2219)
- Fix MissingFieldException duplication (https://github.com/facebook/flipper/issues/2213)
1.5.0 / 2023-02-27
This release contains all features and bugfixes from 1.5.0-RC plus some experimental features and bugfixes on its own (see below). Kotlin 1.8.10 is used as a default.
... (truncated)
f833852 Prepare 1.5.1 release (https://github.com/facebook/flipper/issues/2297)a27e86f Function to retrieve KSerializer by KClass and type arguments serializers (https://github.com/facebook/flipper/issues/2...5a8795a Added FormatLanguage annotation to JSON (https://github.com/facebook/flipper/issues/2234)40eb277 Merge remote-tracking branch 'origin/master' into dev9157bf8 Implement addAll functions for JsonArrayBuilder (https://github.com/facebook/flipper/issues/2156)ef67bce KeyValueSerializer: Fix missing call to endStructure() (https://github.com/facebook/flipper/issues/2272)8007574 ObjectSerializer: Respect sequential decoding (https://github.com/facebook/flipper/issues/2273)0a6eb81 Fix incorrect function name in PrimitiveSerialDescriptor doc comment (https://github.com/facebook/flipper/issues/2289)cfce5d8 Properties Format: Support sealed/polymorphic classes as class properties (https://github.com/facebook/flipper/issues/2...961e87d Adapt tests for K2 and upcoming deprecations in K1 (https://github.com/facebook/flipper/issues/2230)