xref: /aosp_15_r20/external/kotlinx.serialization/CHANGELOG.md (revision 57b5a4a64c534cf7f27ac9427ceab07f3d8ed3d8)
1*57b5a4a6SAndroid Build Coastguard Worker1.6.3 / 2024-02-16
2*57b5a4a6SAndroid Build Coastguard Worker==================
3*57b5a4a6SAndroid Build Coastguard Worker
4*57b5a4a6SAndroid Build Coastguard WorkerThis release provides a couple of new features and uses Kotlin 1.9.22 as default.
5*57b5a4a6SAndroid Build Coastguard Worker
6*57b5a4a6SAndroid Build Coastguard Worker### Class discriminator output mode
7*57b5a4a6SAndroid Build Coastguard Worker
8*57b5a4a6SAndroid Build Coastguard WorkerClass discriminator provides information for serializing and deserializing [polymorphic class hierarchies](docs/polymorphism.md#sealed-classes).
9*57b5a4a6SAndroid Build Coastguard WorkerIn case you want to encode more or less information for various third party APIs about types in the output, it is possible to control
10*57b5a4a6SAndroid Build Coastguard Workeraddition of the class discriminator with the `JsonBuilder.classDiscriminatorMode` property.
11*57b5a4a6SAndroid Build Coastguard WorkerFor example, `ClassDiscriminatorMode.NONE` does not add class discriminator at all, in case the receiving party is not interested in Kotlin types.
12*57b5a4a6SAndroid Build Coastguard WorkerYou can learn more about this feature in the documentation and corresponding [PR](https://github.com/Kotlin/kotlinx.serialization/pull/2532).
13*57b5a4a6SAndroid Build Coastguard Worker
14*57b5a4a6SAndroid Build Coastguard Worker### Other features
15*57b5a4a6SAndroid Build Coastguard Worker
16*57b5a4a6SAndroid Build Coastguard Worker* Add kebab-case naming strategy (#2531) (thanks to [Emil Kantis](https://github.com/Kantis))
17*57b5a4a6SAndroid Build Coastguard Worker* Add value class support to the ProtoBufSchemaGenerator (#2542) (thanks to [Felipe Rotilho](https://github.com/rotilho))
18*57b5a4a6SAndroid Build Coastguard Worker
19*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes and improvements
20*57b5a4a6SAndroid Build Coastguard Worker
21*57b5a4a6SAndroid Build Coastguard Worker* Fix: Hocon polymorphic serialization in containers (#2151) (thanks to [LichtHund](https://github.com/LichtHund))
22*57b5a4a6SAndroid Build Coastguard Worker* Actualize lenient mode documentation (#2568)
23*57b5a4a6SAndroid Build Coastguard Worker* Slightly improve error messages thrown from serializer<T>() function (#2533)
24*57b5a4a6SAndroid Build Coastguard Worker* Do not try to coerce input values for properties (#2530)
25*57b5a4a6SAndroid Build Coastguard Worker* Make empty objects and arrays collapsed in pretty print mode (#2506)
26*57b5a4a6SAndroid Build Coastguard Worker* Update Gradle dokka configuration to make sure "source" button is visible in all API docs (#2518, #2524)
27*57b5a4a6SAndroid Build Coastguard Worker
28*57b5a4a6SAndroid Build Coastguard Worker1.6.2 / 2023-11-30
29*57b5a4a6SAndroid Build Coastguard Worker==================
30*57b5a4a6SAndroid Build Coastguard Worker
31*57b5a4a6SAndroid Build Coastguard WorkerThis is a patch release accompanying Kotlin 1.9.21. It also provides additional targets that were not available in 1.6.1:
32*57b5a4a6SAndroid Build Coastguard Workerwasm-wasi and (deprecated) linuxArm32Hfp.
33*57b5a4a6SAndroid Build Coastguard Worker
34*57b5a4a6SAndroid Build Coastguard Worker* Add Wasm WASI target (#2510)
35*57b5a4a6SAndroid Build Coastguard Worker* Bring back linuxArm32Hfp target because it is deprecated, but not removed yet. (#2505)
36*57b5a4a6SAndroid Build Coastguard Worker
37*57b5a4a6SAndroid Build Coastguard Worker1.6.1 / 2023-11-15
38*57b5a4a6SAndroid Build Coastguard Worker==================
39*57b5a4a6SAndroid Build Coastguard Worker
40*57b5a4a6SAndroid Build Coastguard WorkerThis release uses Kotlin 1.9.20 by default, while upcoming 1.9.21 is also supported.
41*57b5a4a6SAndroid Build Coastguard Worker
42*57b5a4a6SAndroid Build Coastguard Worker### Trailing commas in Json
43*57b5a4a6SAndroid Build Coastguard Worker
44*57b5a4a6SAndroid Build Coastguard WorkerTrailing commas are one of the most popular non-spec Json variations.
45*57b5a4a6SAndroid Build Coastguard WorkerA new configuration flag, `allowTrailingComma`, makes Json parser accept them instead of throwing an exception.
46*57b5a4a6SAndroid Build Coastguard WorkerNote that it does not affect encoding, so kotlinx.serialization always produces Json without trailing commas.
47*57b5a4a6SAndroid Build Coastguard WorkerSee details in the corresponding [PR](https://github.com/Kotlin/kotlinx.serialization/pull/2480)
48*57b5a4a6SAndroid Build Coastguard Worker
49*57b5a4a6SAndroid Build Coastguard Worker### Support of WasmJs target
50*57b5a4a6SAndroid Build Coastguard Worker
51*57b5a4a6SAndroid Build Coastguard WorkerKotlin/Wasm has been experimental for some time and gained enough maturity to be added to the kotlinx libraries.
52*57b5a4a6SAndroid Build Coastguard WorkerStarting with 1.6.1, kotlinx.serialization provides a wasm-js flavor, so your projects with Kotlin/Wasm can have even more
53*57b5a4a6SAndroid Build Coastguard Workerfunctionality.
54*57b5a4a6SAndroid Build Coastguard WorkerAs usual, just add serialization dependencies to your build
55*57b5a4a6SAndroid Build Coastguard Workerand [declare wasmJs target](https://kotlinlang.org/docs/whatsnew1920.html#new-wasm-wasi-target-and-the-renaming-of-the-wasm-target-to-wasm-js).
56*57b5a4a6SAndroid Build Coastguard WorkerPlease remember that Kotlin/Wasm is still experimental, so changes are expected.
57*57b5a4a6SAndroid Build Coastguard Worker
58*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes and improvements
59*57b5a4a6SAndroid Build Coastguard Worker
60*57b5a4a6SAndroid Build Coastguard Worker* Fix TaggedDecoder nullable decoding (#2456) (thanks to [Phillip Schichtel](https://github.com/pschichtel))
61*57b5a4a6SAndroid Build Coastguard Worker* Fix IllegalAccessException for some JPMS boundaries (#2469)
62*57b5a4a6SAndroid Build Coastguard Worker* Cbor: check if inline value classes are marked as @ByteString (#2466) (thanks to [eater](https://github.com/the-eater))
63*57b5a4a6SAndroid Build Coastguard Worker* Improve polymorphic deserialization optimization (#2481)
64*57b5a4a6SAndroid Build Coastguard Worker* Update Okio dependency to 3.6.0 (#2473)
65*57b5a4a6SAndroid Build Coastguard Worker* Add protobuf conformance tests (#2404) (thanks to [Doğaç Eldenk](https://github.com/Dogacel))
66*57b5a4a6SAndroid Build Coastguard Worker* Support decoding maps with boolean keys (#2440)
67*57b5a4a6SAndroid Build Coastguard Worker
68*57b5a4a6SAndroid Build Coastguard Worker1.6.0 / 2023-08-22
69*57b5a4a6SAndroid Build Coastguard Worker==================
70*57b5a4a6SAndroid Build Coastguard Worker
71*57b5a4a6SAndroid Build Coastguard WorkerThis release contains all features and bugfixes from [1.6.0-RC](https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.6.0-RC) plus some bugfixes on its own (see below).
72*57b5a4a6SAndroid Build Coastguard WorkerKotlin 1.9.0 is used as a default, while 1.9.10 is also supported.
73*57b5a4a6SAndroid Build Coastguard Worker
74*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
75*57b5a4a6SAndroid Build Coastguard Worker
76*57b5a4a6SAndroid Build Coastguard Worker  * Improve error messages from Json parser (#2406)
77*57b5a4a6SAndroid Build Coastguard Worker  * Mark @SerialName, @Required and @Transient with @MustBeDocumented (#2407)
78*57b5a4a6SAndroid Build Coastguard Worker  * Ensure that no additional files except java compiler output get into multi-release jar (#2405)
79*57b5a4a6SAndroid Build Coastguard Worker  * Fix enums with negative numbers in protobuf not serializing & de-serializing (#2400) (thanks to [Doğaç Eldenk](https://github.com/Dogacel))
80*57b5a4a6SAndroid Build Coastguard Worker
81*57b5a4a6SAndroid Build Coastguard Worker1.6.0-RC / 2023-08-03
82*57b5a4a6SAndroid Build Coastguard Worker==================
83*57b5a4a6SAndroid Build Coastguard Worker
84*57b5a4a6SAndroid Build Coastguard WorkerThis release is based on the Kotlin 1.9.0.
85*57b5a4a6SAndroid Build Coastguard Worker
86*57b5a4a6SAndroid Build Coastguard Worker### Removal of Legacy JS target
87*57b5a4a6SAndroid Build Coastguard Worker
88*57b5a4a6SAndroid Build Coastguard WorkerSome time ago, in Kotlin 1.8, [JS IR compiler was promoted to stable and old JS compiler was deprecated](https://kotlinlang.org/docs/whatsnew18.html#stable-js-ir-compiler-backend).
89*57b5a4a6SAndroid Build Coastguard WorkerKotlin 1.9 promotes the usage of deprecated JS compiler to an error. As a result, kotlinx.serialization no longer builds with the legacy compiler
90*57b5a4a6SAndroid Build Coastguard Workerand does not distribute artifacts for it. You can read the migration guide for JS IR compiler [here](https://kotlinlang.org/docs/js-ir-migration.html).
91*57b5a4a6SAndroid Build Coastguard Worker
92*57b5a4a6SAndroid Build Coastguard WorkerAlso pay attention to the fact that Kotlin/Native also has some [deprecated targets](https://kotlinlang.org/docs/native-target-support.html#deprecated-targets)
93*57b5a4a6SAndroid Build Coastguard Workerthat 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.
94*57b5a4a6SAndroid Build Coastguard Worker
95*57b5a4a6SAndroid Build Coastguard Worker### Case insensitivity for enums in Json
96*57b5a4a6SAndroid Build Coastguard Worker
97*57b5a4a6SAndroid Build Coastguard WorkerThis release features a new configuration flag for Json: `decodeEnumsCaseInsensitive`
98*57b5a4a6SAndroid Build Coastguard Workerthat allows you to decode enum values in a case-insensitive manner.
99*57b5a4a6SAndroid Build Coastguard WorkerFor example, when decoding `enum class Foo { VALUE_A , VALUE_B}` both inputs `"value_a"` and `"value_A"` will yield `Foo.VALUE_A`.
100*57b5a4a6SAndroid Build Coastguard WorkerYou can read more about this feature in the documentation and corresponding [PR](https://github.com/Kotlin/kotlinx.serialization/pull/2345).
101*57b5a4a6SAndroid Build Coastguard Worker
102*57b5a4a6SAndroid Build Coastguard Worker### Other bugfixes and enhancements
103*57b5a4a6SAndroid Build Coastguard Worker
104*57b5a4a6SAndroid Build Coastguard Worker  * Add support to decode numeric literals containing an exponent (#2227) (thanks to [Roberto Blázquez](https://github.com/xBaank))
105*57b5a4a6SAndroid Build Coastguard Worker  * Fix NoSuchMethodError related to Java 8 API compatibility (#2328, #2350) (thanks to [Björn Kautler](https://github.com/Vampire))
106*57b5a4a6SAndroid Build Coastguard Worker  * Changed actual FormatLanguage annotation for JS and Native to avoid problems with duplicating org.intellij.lang.annotations.Language (#2390, #2379)
107*57b5a4a6SAndroid Build Coastguard Worker  * Fix error triggered by 'consume leading class discriminator' polymorphic parsing optimization (#2362)
108*57b5a4a6SAndroid Build Coastguard Worker  * Fix runtime error with Serializer for Nothing on the JS target (#2330) (thanks to [Shreck Ye](https://github.com/ShreckYe))
109*57b5a4a6SAndroid Build Coastguard Worker  * Fix beginStructure in JsonTreeDecoder when inner structure descriptor is same as outer (#2346) (thanks to [Ugljesa Jovanovic](https://github.com/ionspin))
110*57b5a4a6SAndroid Build Coastguard Worker  * Actualize 'serializer not found' platform-specific message (#2339)
111*57b5a4a6SAndroid Build Coastguard Worker  * Fixed regression with serialization using a list parametrized with contextual types (#2331)
112*57b5a4a6SAndroid Build Coastguard Worker
113*57b5a4a6SAndroid Build Coastguard Worker
114*57b5a4a6SAndroid Build Coastguard Worker1.5.1 / 2023-05-11
115*57b5a4a6SAndroid Build Coastguard Worker==================
116*57b5a4a6SAndroid Build Coastguard WorkerThis release contains an important Native targets overhaul, as well as numerous enhancements and bugfixes.
117*57b5a4a6SAndroid Build Coastguard WorkerKotlin 1.8.21 is used by default.
118*57b5a4a6SAndroid Build Coastguard Worker
119*57b5a4a6SAndroid Build Coastguard Worker### New set of Native targets
120*57b5a4a6SAndroid Build Coastguard Worker
121*57b5a4a6SAndroid Build Coastguard WorkerThe official [Kotlin target support policy](https://kotlinlang.org/docs/native-target-support.html) has recently been published
122*57b5a4a6SAndroid Build Coastguard Workerdescribing new target policy: each target belongs to a certain _tier_, and different tiers have different stability guarantees.
123*57b5a4a6SAndroid Build Coastguard WorkerThe official recommendation for library authors is to support targets up to Tier 3,
124*57b5a4a6SAndroid Build Coastguard Workerand kotlinx.serialization now follows it.
125*57b5a4a6SAndroid Build Coastguard WorkerIt means that in this release, there are a lot of new targets added from this tier,
126*57b5a4a6SAndroid Build Coastguard Workersuch as `androidNativeX86` or `watchosDeviceArm64`.
127*57b5a4a6SAndroid Build Coastguard WorkerNote that since they belong to Tier 3, they're not auto-tested on CI.
128*57b5a4a6SAndroid Build Coastguard Worker
129*57b5a4a6SAndroid Build Coastguard Workerkotlinx.serialization also ships some deprecated Kotlin/Native targets that do not belong to any tier (e.g. `iosArm32`, `mingwX86`).
130*57b5a4a6SAndroid Build Coastguard WorkerWe'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.
131*57b5a4a6SAndroid Build Coastguard Worker
132*57b5a4a6SAndroid Build Coastguard Worker### Improvements in Json elements
133*57b5a4a6SAndroid Build Coastguard Worker
134*57b5a4a6SAndroid Build Coastguard WorkerThere are two new function sets that should make creating raw Json elements easier.
135*57b5a4a6SAndroid Build Coastguard Worker[First one](https://github.com/Kotlin/kotlinx.serialization/pull/2160) contains overloads for `JsonPrimitive` constructor-like function
136*57b5a4a6SAndroid Build Coastguard Workerthat accept unsigned types: `JsonPrimitive(1u)`.
137*57b5a4a6SAndroid Build Coastguard Worker[Second one](https://github.com/Kotlin/kotlinx.serialization/pull/2156) adds new `addAll` functions to `JsonArrayBuilder` to be used with collections
138*57b5a4a6SAndroid Build Coastguard Workerof numbers, booleans or strings: `buildJsonArray { addAll(listOf(1, 2, 3)) }`
139*57b5a4a6SAndroid Build Coastguard WorkerBoth were contributed to us by [aSemy](https://github.com/aSemy).
140*57b5a4a6SAndroid Build Coastguard Worker
141*57b5a4a6SAndroid Build Coastguard Worker### Other enhancements
142*57b5a4a6SAndroid Build Coastguard Worker
143*57b5a4a6SAndroid Build Coastguard Worker  * **Potential source-breaking change**: Rename json-okio `target` variables to `sink` (#2226)
144*57b5a4a6SAndroid Build Coastguard Worker  * Function to retrieve KSerializer by KClass and type arguments serializers (#2291)
145*57b5a4a6SAndroid Build Coastguard Worker  * Added FormatLanguage annotation to Json methods (#2234)
146*57b5a4a6SAndroid Build Coastguard Worker  * Properties Format: Support sealed/polymorphic classes as class properties (#2255)
147*57b5a4a6SAndroid Build Coastguard Worker
148*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
149*57b5a4a6SAndroid Build Coastguard Worker
150*57b5a4a6SAndroid Build Coastguard Worker  * KeyValueSerializer: Fix missing call to endStructure() (#2272)
151*57b5a4a6SAndroid Build Coastguard Worker  * ObjectSerializer: Respect sequential decoding (#2273)
152*57b5a4a6SAndroid Build Coastguard Worker  * Fix value class encoding in various corner cases (#2242)
153*57b5a4a6SAndroid Build Coastguard Worker  * Fix incorrect json decoding iterator's .hasNext() behavior on array-wrapped inputs (#2268)
154*57b5a4a6SAndroid Build Coastguard Worker  * Fix memory leak caused by invalid KTypeWrapper's equals method (#2274)
155*57b5a4a6SAndroid Build Coastguard Worker  * Fixed NoSuchMethodError when parsing a JSON stream on Java 8 (#2219)
156*57b5a4a6SAndroid Build Coastguard Worker  * Fix MissingFieldException duplication (#2213)
157*57b5a4a6SAndroid Build Coastguard Worker
158*57b5a4a6SAndroid Build Coastguard Worker
159*57b5a4a6SAndroid Build Coastguard Worker1.5.0 / 2023-02-27
160*57b5a4a6SAndroid Build Coastguard Worker==================
161*57b5a4a6SAndroid Build Coastguard Worker
162*57b5a4a6SAndroid Build Coastguard WorkerThis release contains all features and bugfixes from 1.5.0-RC plus some experimental features and bugfixes on its own (see below).
163*57b5a4a6SAndroid Build Coastguard WorkerKotlin 1.8.10 is used as a default.
164*57b5a4a6SAndroid Build Coastguard Worker
165*57b5a4a6SAndroid Build Coastguard Worker### HoconEncoder and HoconDecoder interfaces and HOCON-specific serializers
166*57b5a4a6SAndroid Build Coastguard Worker
167*57b5a4a6SAndroid Build Coastguard WorkerThese interfaces work in a way similar to `JsonEncoder` and `JsonDecoder`: they allow intercepting (de)serialization process,
168*57b5a4a6SAndroid Build Coastguard Workermaking writing if custom HOCON-specific serializers easier. New `ConfigMemorySizeSerializer` and `JavaDurationSerializer` already make use of them.
169*57b5a4a6SAndroid Build Coastguard WorkerSee more details in the [PR](https://github.com/Kotlin/kotlinx.serialization/pull/2094).
170*57b5a4a6SAndroid Build Coastguard WorkerBig thanks to [Alexander Mikhailov](https://github.com/alexmihailov) for contributing this!
171*57b5a4a6SAndroid Build Coastguard Worker
172*57b5a4a6SAndroid Build Coastguard Worker### Ability to read buffered huge strings in custom Json deserializers
173*57b5a4a6SAndroid Build Coastguard Worker
174*57b5a4a6SAndroid Build Coastguard WorkerNew interface `ChunkedDecoder` allows you to read huge strings that may not fit in memory by chunks.
175*57b5a4a6SAndroid Build Coastguard WorkerCurrently, this interface is only implemented by Json decoder that works with strings and streams,
176*57b5a4a6SAndroid Build Coastguard Workerbut we may expand it later, if there's a demand for it.
177*57b5a4a6SAndroid Build Coastguard WorkerSee more details in the [PR](https://github.com/Kotlin/kotlinx.serialization/pull/2012) authored by [Alexey Sviridov](https://github.com/fred01).
178*57b5a4a6SAndroid Build Coastguard Worker
179*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
180*57b5a4a6SAndroid Build Coastguard Worker
181*57b5a4a6SAndroid Build Coastguard Worker  * Improve runtime exceptions messages (#2180)
182*57b5a4a6SAndroid Build Coastguard Worker  * Added support for null values for nullable enums in lenient mode (#2176)
183*57b5a4a6SAndroid Build Coastguard Worker  * Prevent class loaders from leaking when using ClassValue cache (#2175)
184*57b5a4a6SAndroid Build Coastguard Worker
185*57b5a4a6SAndroid Build Coastguard Worker1.5.0-RC / 2023-01-25
186*57b5a4a6SAndroid Build Coastguard Worker==================
187*57b5a4a6SAndroid Build Coastguard Worker
188*57b5a4a6SAndroid Build Coastguard WorkerThis is a release candidate for the next version with many new features to try.
189*57b5a4a6SAndroid Build Coastguard WorkerIt uses Kotlin 1.8.0 by default.
190*57b5a4a6SAndroid Build Coastguard Worker
191*57b5a4a6SAndroid Build Coastguard Worker### Json naming strategies
192*57b5a4a6SAndroid Build Coastguard Worker
193*57b5a4a6SAndroid Build Coastguard WorkerA long-awaited feature (#33) is available in this release.
194*57b5a4a6SAndroid Build Coastguard WorkerA new interface, `JsonNamingStrategy` and Json configuration property `namingStrategy` allow
195*57b5a4a6SAndroid Build Coastguard Workerdefining a transformation that is applied to all properties' names serialized by a Json instance.
196*57b5a4a6SAndroid Build Coastguard WorkerThere's also a predefined implementation for the most common use case: `Json { namingStrategy = JsonNamingStrategy.SnakeCase }`.
197*57b5a4a6SAndroid Build Coastguard WorkerCheck out the [PR](https://github.com/Kotlin/kotlinx.serialization/pull/2111) for more details and documentation.
198*57b5a4a6SAndroid Build Coastguard Worker
199*57b5a4a6SAndroid Build Coastguard Worker### Json unquoted literals
200*57b5a4a6SAndroid Build Coastguard Worker
201*57b5a4a6SAndroid Build Coastguard Workerkotlinx-serialization-json has an API for manipulating raw Json values: functions and classes `JsonObject`, `JsonPrimitive`, etc.
202*57b5a4a6SAndroid Build Coastguard WorkerIn this release, there is a new addition to this API: `JsonUnquotedLiteral` constructor function.
203*57b5a4a6SAndroid Build Coastguard WorkerIt allows to produce a string that is not quoted in the Json output. This function has a lot of valuable
204*57b5a4a6SAndroid Build Coastguard Workerapplications: from writing unsigned or large numbers to embedding whole Json documents without the need for re-parsing.
205*57b5a4a6SAndroid Build Coastguard WorkerFor an example, read the [Encoding literal Json content docs](https://github.com/Kotlin/kotlinx.serialization/blob/v1.5.0-RC/docs/json.md#encoding-literal-json-content-experimental).
206*57b5a4a6SAndroid Build Coastguard WorkerThis huge feature was contributed to us by [aSemy](https://github.com/aSemy): [#2041](https://github.com/Kotlin/kotlinx.serialization/pull/2041).
207*57b5a4a6SAndroid Build Coastguard Worker
208*57b5a4a6SAndroid Build Coastguard Worker### Stabilization of serializer(java.lang.Type) function family
209*57b5a4a6SAndroid Build Coastguard Worker
210*57b5a4a6SAndroid Build Coastguard WorkerFunctions `serializer`, `serializerOrNull` and extensions `SerializersModule.serializer`, `SerializersModule.serializerOrNull`
211*57b5a4a6SAndroid Build Coastguard Workerhave JVM-only overloads that accept `java.lang.Type`. These overloads are crucial for interoperability: with them, third-party Java frameworks
212*57b5a4a6SAndroid Build Coastguard Workerlike Spring, which usually rely on Java's reflection and type tokens, can retrieve `KSerializer` instance and use kotlinx.serialization properly.
213*57b5a4a6SAndroid Build Coastguard WorkerWe've removed `@ExperimentalSerializationApi` from these functions, and starting from 1.5.0-RC they're considered stable with all backward compatibility guarantees.
214*57b5a4a6SAndroid Build Coastguard WorkerThis change should improve third-party support for kotlinx.serialization in various frameworks.
215*57b5a4a6SAndroid Build Coastguard WorkerSee the [PR](https://github.com/Kotlin/kotlinx.serialization/issues/2069) for details.
216*57b5a4a6SAndroid Build Coastguard Worker
217*57b5a4a6SAndroid Build Coastguard Worker### Deprecations in module builders for polymorphism
218*57b5a4a6SAndroid Build Coastguard Worker
219*57b5a4a6SAndroid Build Coastguard WorkerSome time ago, in 1.3.2, new functions `SerializersModuleBuilder.polymorphicDefaultSerializer/polymorphicDefaultDeserializer` and `PolymorphicModuleBuilder.defaultDeserializer` were introduced
220*57b5a4a6SAndroid Build Coastguard Worker— better names allow an easier understanding of which serializers affect what part of the process.
221*57b5a4a6SAndroid Build Coastguard WorkerIn 1.5.0-RC, we finish the migration path: these functions are no longer experimental.
222*57b5a4a6SAndroid Build Coastguard WorkerAnd old functions, namely `SerializersModuleCollector.polymorphicDefault` and `PolymorphicModuleBuilder.default`, are now deprecated.
223*57b5a4a6SAndroid Build Coastguard WorkerSee the [PR](https://github.com/Kotlin/kotlinx.serialization/issues/2076) for details.
224*57b5a4a6SAndroid Build Coastguard Worker
225*57b5a4a6SAndroid Build Coastguard Worker### Bundled Proguard rules
226*57b5a4a6SAndroid Build Coastguard Worker
227*57b5a4a6SAndroid Build Coastguard WorkerThe `kotlinx-serialization-core-jvm` JAR file now includes consumer Proguard rules,
228*57b5a4a6SAndroid Build Coastguard Workerso manual Proguard configuration is no longer necessary for most of the setups.
229*57b5a4a6SAndroid Build Coastguard WorkerSee updated [Android setup section](https://github.com/Kotlin/kotlinx.serialization/blob/169a14558ca13cfd731283a854d825d1f19ef195/README.md#android)
230*57b5a4a6SAndroid Build Coastguard Workerand corresponding PRs: [#2092](https://github.com/Kotlin/kotlinx.serialization/issues/2092), [#2123](https://github.com/Kotlin/kotlinx.serialization/issues/2123).
231*57b5a4a6SAndroid Build Coastguard Worker
232*57b5a4a6SAndroid Build Coastguard Worker### Support for kotlin.Duration in HOCON format
233*57b5a4a6SAndroid Build Coastguard Worker
234*57b5a4a6SAndroid Build Coastguard WorkerHOCON specifies its own formatting for duration values. Starting with this release,
235*57b5a4a6SAndroid Build Coastguard Workerkotlinx-serialization-hocon is able to serialize and deserialize `kotlin.Duration`
236*57b5a4a6SAndroid Build Coastguard Workerusing proper representation instead of the default one. Big thanks to [Alexander Mikhailov](https://github.com/alexmihailov)
237*57b5a4a6SAndroid Build Coastguard Workerand his PRs: [#2080](https://github.com/Kotlin/kotlinx.serialization/issues/2080), [#2073](https://github.com/Kotlin/kotlinx.serialization/issues/2073).
238*57b5a4a6SAndroid Build Coastguard Worker
239*57b5a4a6SAndroid Build Coastguard Worker### Functional and performance improvements
240*57b5a4a6SAndroid Build Coastguard Worker
241*57b5a4a6SAndroid Build Coastguard Worker  * Make DeserializationStrategy covariant at declaration-site (#1897) (thanks to [Lukellmann](https://github.com/Lukellmann))
242*57b5a4a6SAndroid Build Coastguard Worker  * Added support for the `kotlin.Nothing` class as built-in (#1991, #2150)
243*57b5a4a6SAndroid Build Coastguard Worker  * Further improve stream decoding performance (#2101)
244*57b5a4a6SAndroid Build Coastguard Worker  * Introduce CharArray pooling for InputStream decoding (#2100)
245*57b5a4a6SAndroid Build Coastguard Worker  * Consolidate exception messages and improve them (#2068)
246*57b5a4a6SAndroid Build Coastguard Worker
247*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
248*57b5a4a6SAndroid Build Coastguard Worker
249*57b5a4a6SAndroid Build Coastguard Worker  * Add stable hashCode()/equals() calculation to PrimitiveSerialDescriptor (#2136) (thanks to [Vasily Vasilkov](https://github.com/vgv))
250*57b5a4a6SAndroid Build Coastguard Worker  * Added a factory that creates an enum serializer with annotations on the class (#2125)
251*57b5a4a6SAndroid Build Coastguard Worker  * Correctly handle situation where different serializers can be provided for the same KClass in SealedClassSerializer (#2113)
252*57b5a4a6SAndroid Build Coastguard Worker  * Fixed serializers caching for parametrized types from different class loaders (#2070)
253*57b5a4a6SAndroid Build Coastguard Worker
254*57b5a4a6SAndroid Build Coastguard Worker
255*57b5a4a6SAndroid Build Coastguard Worker1.4.1 / 2022-10-14
256*57b5a4a6SAndroid Build Coastguard Worker==================
257*57b5a4a6SAndroid Build Coastguard Worker
258*57b5a4a6SAndroid Build Coastguard WorkerThis is patch release contains several bugfixes and improvements.
259*57b5a4a6SAndroid Build Coastguard WorkerKotlin 1.7.20 is used by default.
260*57b5a4a6SAndroid Build Coastguard Worker
261*57b5a4a6SAndroid Build Coastguard Worker### Improvements
262*57b5a4a6SAndroid Build Coastguard Worker
263*57b5a4a6SAndroid Build Coastguard Worker  * Add @MustBeDocumented to certain annotations (#2059)
264*57b5a4a6SAndroid Build Coastguard Worker  * Deprecate .isNullable in SerialDescriptor builder (#2040)
265*57b5a4a6SAndroid Build Coastguard Worker  * Unsigned primitives and unsigned arrays serializers can be retrieved as built-ins (#1992)
266*57b5a4a6SAndroid Build Coastguard Worker  * Serializers are now cached inside reflective lookup, leading to faster serializer retrieval (#2015)
267*57b5a4a6SAndroid Build Coastguard Worker  * Compiler plugin can create enum serializers using static factories for better speed (#1851) (Kotlin 1.7.20 required)
268*57b5a4a6SAndroid Build Coastguard Worker  * Provide foundation for compiler plugin intrinsics available in Kotlin 1.8.0 (#2031)
269*57b5a4a6SAndroid Build Coastguard Worker
270*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
271*57b5a4a6SAndroid Build Coastguard Worker
272*57b5a4a6SAndroid Build Coastguard Worker  * Support polymorphism in Properties format (#2052) (thanks to [Rodrigo Vedovato](https://github.com/rodrigovedovato))
273*57b5a4a6SAndroid Build Coastguard Worker  * Added support of UTF-16 surrogate pairs to okio streams (#2033)
274*57b5a4a6SAndroid Build Coastguard Worker  * Fix dependency on core module from HOCON module (#2020) (thanks to [Osip Fatkullin](https://github.com/osipxd))
275*57b5a4a6SAndroid Build Coastguard Worker
276*57b5a4a6SAndroid Build Coastguard Worker
277*57b5a4a6SAndroid Build Coastguard Worker1.4.0 / 2022-08-18
278*57b5a4a6SAndroid Build Coastguard Worker==================
279*57b5a4a6SAndroid Build Coastguard Worker
280*57b5a4a6SAndroid Build Coastguard WorkerThis release contains all features and bugfixes from 1.4.0-RC plus some bugfixes on its own (see below).
281*57b5a4a6SAndroid Build Coastguard WorkerKotlin 1.7.10 is used as a default.
282*57b5a4a6SAndroid Build Coastguard Worker
283*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
284*57b5a4a6SAndroid Build Coastguard Worker  * Fixed decoding of huge JSON data for okio streams (#2006)
285*57b5a4a6SAndroid Build Coastguard Worker
286*57b5a4a6SAndroid Build Coastguard Worker
287*57b5a4a6SAndroid Build Coastguard Worker1.4.0-RC / 2022-07-20
288*57b5a4a6SAndroid Build Coastguard Worker==================
289*57b5a4a6SAndroid Build Coastguard Worker
290*57b5a4a6SAndroid Build Coastguard WorkerThis is a candidate for the next big release with many new exciting features to try.
291*57b5a4a6SAndroid Build Coastguard WorkerIt uses Kotlin 1.7.10 by default.
292*57b5a4a6SAndroid Build Coastguard Worker
293*57b5a4a6SAndroid Build Coastguard Worker### Integration with Okio's BufferedSource and BufferedSink
294*57b5a4a6SAndroid Build Coastguard Worker
295*57b5a4a6SAndroid Build Coastguard Worker[Okio library by Square](https://square.github.io/okio/) is a popular solution for fast and efficient IO operations on JVM, K/N and K/JS.
296*57b5a4a6SAndroid Build Coastguard WorkerIn this version, we have added functions that parse/write JSON directly to Okio's input/output classes, saving you the overhead of copying data to `String` beforehand.
297*57b5a4a6SAndroid Build Coastguard WorkerThese functions are called `Json.decodeFromBufferedSource` and `Json.encodeToBufferedSink`, respectively.
298*57b5a4a6SAndroid Build Coastguard WorkerThere's also `decodeBufferedSourceToSequence` that behaves similarly to `decodeToSequence` from Java streams integration, so you can lazily decode multiple objects the same way as before.
299*57b5a4a6SAndroid Build Coastguard Worker
300*57b5a4a6SAndroid Build Coastguard WorkerNote that these functions are located in a separate new artifact, so users who don't need them wouldn't find themselves dependent on Okio.
301*57b5a4a6SAndroid Build Coastguard WorkerTo include this artifact in your project, use the same group id `org.jetbrains.kotlinx` and artifact id `kotlinx-serialization-json-okio`.
302*57b5a4a6SAndroid Build Coastguard WorkerTo find out more about this integration, check new functions' documentation and corresponding pull requests:
303*57b5a4a6SAndroid Build Coastguard Worker[#1901](https://github.com/Kotlin/kotlinx.serialization/pull/1901) and [#1982](https://github.com/Kotlin/kotlinx.serialization/pull/1982).
304*57b5a4a6SAndroid Build Coastguard Worker
305*57b5a4a6SAndroid Build Coastguard Worker### Inline classes and unsigned numbers do not require experimental annotations anymore
306*57b5a4a6SAndroid Build Coastguard Worker
307*57b5a4a6SAndroid Build Coastguard WorkerInline classes and unsigned number types have been promoted to a Stable feature in Kotlin 1.5,
308*57b5a4a6SAndroid Build Coastguard Workerand now we are promoting support for them in kotlinx.serialization to Stable status, too.
309*57b5a4a6SAndroid Build Coastguard WorkerTo be precise, [we've removed all](https://github.com/Kotlin/kotlinx.serialization/pull/1963) `@ExperimentalSerializationApi` annotations from functions related to inline classes encoding and decoding,
310*57b5a4a6SAndroid Build Coastguard Workernamely `SerialDescriptor.isInline`, `Encoder.encodeInline`, and some others. We've also updated related [documentation article](docs/value-classes.md).
311*57b5a4a6SAndroid Build Coastguard Worker
312*57b5a4a6SAndroid Build Coastguard WorkerAdditionally, all `@ExperimentalUnsignedTypes` annotations [were removed](https://github.com/Kotlin/kotlinx.serialization/pull/1962) completely,
313*57b5a4a6SAndroid Build Coastguard Workerso you can freely use types such as `UInt` and their respective serializers as a stable feature
314*57b5a4a6SAndroid Build Coastguard Workerwithout opt-in requirement.
315*57b5a4a6SAndroid Build Coastguard Worker
316*57b5a4a6SAndroid Build Coastguard Worker### Part of SerializationException's hierarchy is public now
317*57b5a4a6SAndroid Build Coastguard Worker
318*57b5a4a6SAndroid Build Coastguard WorkerWhen kotlinx.serialization 1.0 was released, all subclasses of `SerializationException` were made internal,
319*57b5a4a6SAndroid Build Coastguard Workersince they didn't provide helpful information besides the standard message.
320*57b5a4a6SAndroid Build Coastguard WorkerSince then, we've received a lot of feature requests with compelling use-cases for exposing some of these internal types to the public.
321*57b5a4a6SAndroid Build Coastguard WorkerIn this release, we are starting to fulfilling these requests by making `MissingFieldException` public.
322*57b5a4a6SAndroid Build Coastguard WorkerOne can use it in the `catch` clause to better understand the reasons of failure — for example, to return 400 instead of 500 from an HTTP server —
323*57b5a4a6SAndroid Build Coastguard Workerand then use its `fields` property to communicate the message better.
324*57b5a4a6SAndroid Build Coastguard WorkerSee the details in the corresponding [PR](https://github.com/Kotlin/kotlinx.serialization/pull/1983).
325*57b5a4a6SAndroid Build Coastguard Worker
326*57b5a4a6SAndroid Build Coastguard WorkerIn future releases, we'll continue work in this direction, and we aim to provide more useful public exception types & properties.
327*57b5a4a6SAndroid Build Coastguard WorkerIn the meantime, we've [revamped KDoc](https://github.com/Kotlin/kotlinx.serialization/pull/1980) for some methods regarding the exceptions — all of them now properly declare which exception types are allowed to be thrown.
328*57b5a4a6SAndroid Build Coastguard WorkerFor example, `KSerializer.deserialize` is documented to throw `IllegalStateException` to indicate problems unrelated to serialization, such as data validation in classes' constructors.
329*57b5a4a6SAndroid Build Coastguard Worker
330*57b5a4a6SAndroid Build Coastguard Worker### @MetaSerializable annotation
331*57b5a4a6SAndroid Build Coastguard Worker
332*57b5a4a6SAndroid Build Coastguard WorkerThis release introduces a new `@MetaSerializable` annotation that adds `@Serializable` behavior to user-defined annotations — i.e., those annotations would also instruct the compiler plugin to generate a serializer for class. In addition, all annotations marked with `@MetaSerializable` are saved in the generated `@SerialDescriptor`
333*57b5a4a6SAndroid Build Coastguard Workeras if they are annotated with `@SerialInfo`.
334*57b5a4a6SAndroid Build Coastguard Worker
335*57b5a4a6SAndroid Build Coastguard WorkerThis annotation will be particularly useful for various format authors who require adding some metadata to the serializable class — this can now be done using a single annotation instead of two, and without the risk of forgetting `@Serializable`. Check out details & examples in the KDoc and corresponding [PR](https://github.com/Kotlin/kotlinx.serialization/pull/1979).
336*57b5a4a6SAndroid Build Coastguard Worker
337*57b5a4a6SAndroid Build Coastguard Worker> Note: Kotlin 1.7.0 or higher is required for this feature to work.
338*57b5a4a6SAndroid Build Coastguard Worker
339*57b5a4a6SAndroid Build Coastguard Worker### Moving documentation from GitHub pages to kotlinlang.org
340*57b5a4a6SAndroid Build Coastguard Worker
341*57b5a4a6SAndroid Build Coastguard WorkerAs a part of a coordinated effort to unify kotlinx libraries users' experience, Dokka-generated documentation pages (KDoc) were moved from https://kotlin.github.io/kotlinx.serialization/ to https://kotlinlang.org/api/kotlinx.serialization/. No action from you is required — there are proper redirects at the former address, so there is no need to worry about links in your blogpost getting obsolete or broken.
342*57b5a4a6SAndroid Build Coastguard Worker
343*57b5a4a6SAndroid Build Coastguard WorkerNote that this move does not affect guides written in Markdown in the `docs` folder. We aim to move them later, enriching text with runnable examples as in the Kotlin language guides.
344*57b5a4a6SAndroid Build Coastguard Worker
345*57b5a4a6SAndroid Build Coastguard Worker### Other improvements
346*57b5a4a6SAndroid Build Coastguard Worker
347*57b5a4a6SAndroid Build Coastguard Worker  * Allow Kotlin's null literal in JSON DSL (#1907) (thanks to [Lukellmann](https://github.com/Lukellmann))
348*57b5a4a6SAndroid Build Coastguard Worker  * Stabilize EmptySerializersModule (#1921)
349*57b5a4a6SAndroid Build Coastguard Worker  * Boost performance of polymorphic deserialization in optimistic scenario (#1919)
350*57b5a4a6SAndroid Build Coastguard Worker  * Added serializer for the `kotlin.time.Duration` class (plugin support comes in Kotlin 1.7.20) (#1960)
351*57b5a4a6SAndroid Build Coastguard Worker  * Support tagged not null marks in TaggedEncoder/Decoder (#1954) (thanks to [EdwarDDay](https://github.com/EdwarDDay))
352*57b5a4a6SAndroid Build Coastguard Worker
353*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
354*57b5a4a6SAndroid Build Coastguard Worker
355*57b5a4a6SAndroid Build Coastguard Worker  * Support quoting unsigned integers when used as map keys (#1969)
356*57b5a4a6SAndroid Build Coastguard Worker  * Fix protocol buffer enum schema generation (#1967) (thanks to [mogud](https://github.com/mogud))
357*57b5a4a6SAndroid Build Coastguard Worker  * Support diamond inheritance of sealed interfaces in SealedClassSerializer (#1958)
358*57b5a4a6SAndroid Build Coastguard Worker  * Support retrieving serializer for sealed interface  (#1968)
359*57b5a4a6SAndroid Build Coastguard Worker  * Fix misleading token description in JSON errors (#1941) (thanks to [TheMrMilchmann](https://github.com/TheMrMilchmann))
360*57b5a4a6SAndroid Build Coastguard Worker
361*57b5a4a6SAndroid Build Coastguard Worker1.3.3 / 2022-05-11
362*57b5a4a6SAndroid Build Coastguard Worker==================
363*57b5a4a6SAndroid Build Coastguard Worker
364*57b5a4a6SAndroid Build Coastguard WorkerThis release contains support for Protocol Buffers packed fields, as well as several bugfixes.
365*57b5a4a6SAndroid Build Coastguard WorkerIt uses Kotlin 1.6.21 by default.
366*57b5a4a6SAndroid Build Coastguard Worker
367*57b5a4a6SAndroid Build Coastguard Worker### Protobuf packed fields
368*57b5a4a6SAndroid Build Coastguard Worker
369*57b5a4a6SAndroid Build Coastguard WorkerIt is now possible to encode and decode Kotlin classes to/from Protobuf messages with [packed repeated fields](https://developers.google.com/protocol-buffers/docs/encoding#packed).
370*57b5a4a6SAndroid Build Coastguard WorkerTo mark the field as packed, use `@ProtoPacked` annotation on it.
371*57b5a4a6SAndroid Build Coastguard WorkerNote it affects only `List` and primitive collection such as `IntArray` types.
372*57b5a4a6SAndroid Build Coastguard WorkerWith this feature, it is now possible to decode Proto3 messages, where all repeated fields are packed by default.
373*57b5a4a6SAndroid Build Coastguard Worker[Protobuf schema generator](https://kotlin.github.io/kotlinx.serialization/kotlinx-serialization-protobuf/kotlinx.serialization.protobuf.schema/-proto-buf-schema-generator/index.html) also supports new `@ProtoPacked` annotation.
374*57b5a4a6SAndroid Build Coastguard Worker
375*57b5a4a6SAndroid Build Coastguard WorkerMany thanks to [Paul de Vrieze](https://github.com/pdvrieze) for his valuable contribution!
376*57b5a4a6SAndroid Build Coastguard Worker
377*57b5a4a6SAndroid Build Coastguard Worker### Other improvements & small features
378*57b5a4a6SAndroid Build Coastguard Worker
379*57b5a4a6SAndroid Build Coastguard Worker  * Incorporate JsonPath into exception messages (#1841)
380*57b5a4a6SAndroid Build Coastguard Worker  * Mark block in corresponding encodeStructure/decodeStructure extensions as crossinline to reduce amount of bytecode (#1917)
381*57b5a4a6SAndroid Build Coastguard Worker  * Support serialization of compile-time `Collection<E>` properties that are not lists at the runtime (#1821)
382*57b5a4a6SAndroid Build Coastguard Worker  * Best-effort kotlin reflect avoidance in serializer(Type) (#1819)
383*57b5a4a6SAndroid Build Coastguard Worker
384*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
385*57b5a4a6SAndroid Build Coastguard Worker
386*57b5a4a6SAndroid Build Coastguard Worker  * Iterate over element indices in ObjectSerializer in order to let the format skip unknown keys (#1916)
387*57b5a4a6SAndroid Build Coastguard Worker  * Correctly support registering both default polymorphic serializer & deserializer (#1849)
388*57b5a4a6SAndroid Build Coastguard Worker  * Make error message for captured generic type parameters much more straightforward (#1863)
389*57b5a4a6SAndroid Build Coastguard Worker
390*57b5a4a6SAndroid Build Coastguard Worker1.3.2 / 2021-12-23
391*57b5a4a6SAndroid Build Coastguard Worker==================
392*57b5a4a6SAndroid Build Coastguard Worker
393*57b5a4a6SAndroid Build Coastguard WorkerThis release contains several features and bugfixes for core API as well as for HOCON format.
394*57b5a4a6SAndroid Build Coastguard WorkerIt uses Kotlin 1.6.10 by default.
395*57b5a4a6SAndroid Build Coastguard Worker
396*57b5a4a6SAndroid Build Coastguard Worker### Serializing objects to HOCON
397*57b5a4a6SAndroid Build Coastguard Worker
398*57b5a4a6SAndroid Build Coastguard WorkerIt's now possible to encode Kotlin objects to `Config` values with new `Hocon.encodeToConfig` function.
399*57b5a4a6SAndroid Build Coastguard WorkerThis feature may help edit existing configs inside Kotlin program or generate new ones.
400*57b5a4a6SAndroid Build Coastguard Worker
401*57b5a4a6SAndroid Build Coastguard WorkerBig thanks to [Osip Fatkullin](https://github.com/osipxd) for [implementing](https://github.com/Kotlin/kotlinx.serialization/pull/1740) this.
402*57b5a4a6SAndroid Build Coastguard Worker
403*57b5a4a6SAndroid Build Coastguard Worker### Polymorphic default serializers
404*57b5a4a6SAndroid Build Coastguard Worker
405*57b5a4a6SAndroid Build Coastguard WorkerAs of now, `polymorphicDefault` clause inside `SerializersModule { }` builder specifies a
406*57b5a4a6SAndroid Build Coastguard Workerfallback serializer to be used only during deserialization process. A new function has been introduced to allow setting
407*57b5a4a6SAndroid Build Coastguard Workerfallback serializer for serialization: `polymorphicDefaultSerializer`.
408*57b5a4a6SAndroid Build Coastguard WorkerThis function should ease serializing vast hierarchies of third-party or Java classes.
409*57b5a4a6SAndroid Build Coastguard Worker
410*57b5a4a6SAndroid Build Coastguard WorkerNote that there are two new experimental functions, `polymorphicDefaultSerializer` and `polymorphicDefaultDeserializer`.
411*57b5a4a6SAndroid Build Coastguard WorkerTo avoid naming confusion, we are going to deprecate `polymorphicDefault` in favor of `polymorphicDefaultDeserializer` in the next minor release (1.4.0).
412*57b5a4a6SAndroid Build Coastguard Worker
413*57b5a4a6SAndroid Build Coastguard WorkerCredit for [the PR](https://github.com/Kotlin/kotlinx.serialization/pull/1686) goes to our contributor [Joseph Burton](https://github.com/Earthcomputer).
414*57b5a4a6SAndroid Build Coastguard Worker
415*57b5a4a6SAndroid Build Coastguard Worker### Other improvements
416*57b5a4a6SAndroid Build Coastguard Worker
417*57b5a4a6SAndroid Build Coastguard Worker  * HOCON: parse strings into integers and booleans if possible (#1795) (thanks to [tobiaslieber](https://github.com/tobiaslieber))
418*57b5a4a6SAndroid Build Coastguard Worker  * Add an encodeCollection extensions (#1749) (thanks to [Nicklas Ansman Giertz](https://github.com/ansman))
419*57b5a4a6SAndroid Build Coastguard Worker
420*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
421*57b5a4a6SAndroid Build Coastguard Worker
422*57b5a4a6SAndroid Build Coastguard Worker  * Properly handle top-level value classes in encodeToJsonElement (#1777)
423*57b5a4a6SAndroid Build Coastguard Worker  * Fix incorrect handling of object end when JsonTreeReader (JsonElement) is used with decodeToSequence (#1782)
424*57b5a4a6SAndroid Build Coastguard Worker
425*57b5a4a6SAndroid Build Coastguard Worker1.3.1 / 2021-11-11
426*57b5a4a6SAndroid Build Coastguard Worker==================
427*57b5a4a6SAndroid Build Coastguard Worker
428*57b5a4a6SAndroid Build Coastguard WorkerThis release mainly contains bugfixes for 1.3.0 and provides new experimental `Json.decodeToSequence` function.
429*57b5a4a6SAndroid Build Coastguard Worker
430*57b5a4a6SAndroid Build Coastguard Worker### Improvements
431*57b5a4a6SAndroid Build Coastguard Worker
432*57b5a4a6SAndroid Build Coastguard Worker  * Provide decodeToSequence to read multiple objects from stream lazily (#1691)
433*57b5a4a6SAndroid Build Coastguard Worker
434*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
435*57b5a4a6SAndroid Build Coastguard Worker
436*57b5a4a6SAndroid Build Coastguard Worker  * Correctly handle buffer boundaries while decoding escape sequences from json stream (#1706)
437*57b5a4a6SAndroid Build Coastguard Worker  * Properly skip unknown keys for objects and structures with zero properties (#1720)
438*57b5a4a6SAndroid Build Coastguard Worker  * Fix merging for maplikeSerializer when the map is not empty (by using the actual size * 2). (#1712) (thanks to [pdvrieze](https://github.com/pdvrieze))
439*57b5a4a6SAndroid Build Coastguard Worker  * Fix lookup of primitive array serializers by Java type token (#1708)
440*57b5a4a6SAndroid Build Coastguard Worker
441*57b5a4a6SAndroid Build Coastguard Worker
442*57b5a4a6SAndroid Build Coastguard Worker1.3.0 / 2021-09-23
443*57b5a4a6SAndroid Build Coastguard Worker==================
444*57b5a4a6SAndroid Build Coastguard Worker
445*57b5a4a6SAndroid Build Coastguard WorkerThis release contains all of the cool new features from 1.3.0-RC (see below) as well as minor improvements.
446*57b5a4a6SAndroid Build Coastguard WorkerIt uses Kotlin 1.5.31 by default.
447*57b5a4a6SAndroid Build Coastguard Worker
448*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes and improvements
449*57b5a4a6SAndroid Build Coastguard Worker
450*57b5a4a6SAndroid Build Coastguard Worker  * Promote JsonConfiguration and its usages to stable (#1690)
451*57b5a4a6SAndroid Build Coastguard Worker  * Remove opt-in annotations from SerialFormat, StringFormat, BinaryFormat (#1688)
452*57b5a4a6SAndroid Build Coastguard Worker  * Correctly throw SerializationException instead of IOOBE for some cases with EOF in streams (#1677)
453*57b5a4a6SAndroid Build Coastguard Worker  * CBOR: ignore tags when reading (#1614) (thanks to [David Robertson](https://github.com/DavidJRobertson))
454*57b5a4a6SAndroid Build Coastguard Worker
455*57b5a4a6SAndroid Build Coastguard Worker1.3.0-RC / 2021-09-06
456*57b5a4a6SAndroid Build Coastguard Worker==================
457*57b5a4a6SAndroid Build Coastguard Worker
458*57b5a4a6SAndroid Build Coastguard WorkerThis is a release candidate for the next version. It contains a lot of interesting features and improvements,
459*57b5a4a6SAndroid Build Coastguard Workerso we ask you to evaluate it and share your feedback.
460*57b5a4a6SAndroid Build Coastguard WorkerKotlin 1.5.30 is used by default.
461*57b5a4a6SAndroid Build Coastguard Worker
462*57b5a4a6SAndroid Build Coastguard Worker### Java IO stream-based JSON serialization
463*57b5a4a6SAndroid Build Coastguard Worker
464*57b5a4a6SAndroid Build Coastguard WorkerFinally, in `kotlinx.serialization` 1.3.0 we’re presenting the first experimental version of the serialization API for IO streams:
465*57b5a4a6SAndroid Build Coastguard Worker`Json.encodeToStream` and `Json.decodeFromStream` extension functions.
466*57b5a4a6SAndroid Build Coastguard WorkerWith this API, you can decode objects directly from files, network connections, and other data sources without reading the data to strings beforehand.
467*57b5a4a6SAndroid Build Coastguard WorkerThe opposite operation is also available: you can send encoded objects directly to files and other streams in a single API call.
468*57b5a4a6SAndroid Build Coastguard WorkerIO stream serialization is available only on the JVM platform and for the JSON format for now.
469*57b5a4a6SAndroid Build Coastguard Worker
470*57b5a4a6SAndroid Build Coastguard WorkerCheck out more in the [PR](https://github.com/Kotlin/kotlinx.serialization/pull/1569).
471*57b5a4a6SAndroid Build Coastguard Worker
472*57b5a4a6SAndroid Build Coastguard Worker### Property-level control over defaults values encoding
473*57b5a4a6SAndroid Build Coastguard Worker
474*57b5a4a6SAndroid Build Coastguard WorkerPrevious versions of the library allowed to specify whether to encode or drop default properties values with
475*57b5a4a6SAndroid Build Coastguard Workerformat configuration flags such as `Json { encodeDefaults = false }`.
476*57b5a4a6SAndroid Build Coastguard WorkerIn 1.3.0 we’re extending this feature by adding a new way to fine-tune the serialization of default values:
477*57b5a4a6SAndroid Build Coastguard Workeryou can now control it on the property level using the new `@EncodeDefaults` annotation.
478*57b5a4a6SAndroid Build Coastguard Worker
479*57b5a4a6SAndroid Build Coastguard Worker`@EncodeDefaults` annotation has a higher priority over the `encodeDefaults` property and takes one of two possible values:
480*57b5a4a6SAndroid Build Coastguard Worker- `ALWAYS` (default value) encodes a property value even if it equals to default.
481*57b5a4a6SAndroid Build Coastguard Worker- `NEVER` doesn’t encode the default value regardless of the format configuration.
482*57b5a4a6SAndroid Build Coastguard Worker
483*57b5a4a6SAndroid Build Coastguard WorkerEncoding of the annotated properties is not affected by `encodeDefault` format flag
484*57b5a4a6SAndroid Build Coastguard Workerand works as described for all serialization formats, not only JSON.
485*57b5a4a6SAndroid Build Coastguard Worker
486*57b5a4a6SAndroid Build Coastguard WorkerTo learn more, check corresponding [PR](https://github.com/Kotlin/kotlinx.serialization/pull/1528).
487*57b5a4a6SAndroid Build Coastguard Worker
488*57b5a4a6SAndroid Build Coastguard Worker### Excluding null values from JSON serialization
489*57b5a4a6SAndroid Build Coastguard Worker
490*57b5a4a6SAndroid Build Coastguard WorkerIn 1.3.0, we’re introducing one more way to reduce the size of the generated JSON strings: omitting null values.
491*57b5a4a6SAndroid Build Coastguard WorkerA new JSON configuration property `explicitNulls` defines whether `null` property values should be included in the serialized JSON string.
492*57b5a4a6SAndroid Build Coastguard WorkerThe difference from `encodeDefaults` is that `explicitNulls = false` flag drops null values even if the property does not have a default value.
493*57b5a4a6SAndroid Build Coastguard WorkerUpon deserializing such a missing property, a `null` or default value (if it exists) will be used.
494*57b5a4a6SAndroid Build Coastguard Worker
495*57b5a4a6SAndroid Build Coastguard WorkerTo maintain backwards compatibility, this flag is set to `true` by default.
496*57b5a4a6SAndroid Build Coastguard WorkerYou can learn more in the [documentation](docs/json.md#explicit-nulls) or the [PR](https://github.com/Kotlin/kotlinx.serialization/pull/1535).
497*57b5a4a6SAndroid Build Coastguard Worker
498*57b5a4a6SAndroid Build Coastguard Worker### Per-hierarchy polymorphic class discriminators
499*57b5a4a6SAndroid Build Coastguard Worker
500*57b5a4a6SAndroid Build Coastguard WorkerIn previous versions, you could change the discriminator name using the
501*57b5a4a6SAndroid Build Coastguard Worker[classDiscriminator](https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/json.md#class-discriminator) property of the `Json` instance.
502*57b5a4a6SAndroid Build Coastguard WorkerIn 1.3.0, we’re adding a way to set a custom discriminator name for each class hierarchy to enable more flexible serialization.
503*57b5a4a6SAndroid Build Coastguard WorkerYou can do it by annotating a class with `@JsonClassDiscriminator` with the discriminator name as its argument.
504*57b5a4a6SAndroid Build Coastguard WorkerA custom discriminator is applied to the annotated class and its subclasses.
505*57b5a4a6SAndroid Build Coastguard WorkerOnly one custom discriminator can be used in each class hierarchy, thanks to the new `@InheritableSerialInfo` annotation.
506*57b5a4a6SAndroid Build Coastguard Worker
507*57b5a4a6SAndroid Build Coastguard WorkerCheck out corresponding [PR](https://github.com/Kotlin/kotlinx.serialization/pull/1608) for details.
508*57b5a4a6SAndroid Build Coastguard Worker
509*57b5a4a6SAndroid Build Coastguard Worker### Support for Java module system
510*57b5a4a6SAndroid Build Coastguard Worker
511*57b5a4a6SAndroid Build Coastguard WorkerNow all kotlinx.serialization runtime libraries are shipped as a multi-release JAR with `module-info.class` file for Java versions 9 and higher.
512*57b5a4a6SAndroid Build Coastguard WorkerThis enables possibilities to use kotlinx.serialization with modern tools such as `jlink` and various technologies such as `TorandoFX`.
513*57b5a4a6SAndroid Build Coastguard Worker
514*57b5a4a6SAndroid Build Coastguard WorkerMany thanks to our contributor [Gerard de Leeuw](https://github.com/lion7) and his [PR](https://github.com/Kotlin/kotlinx.serialization/pull/1624) for making this possible.
515*57b5a4a6SAndroid Build Coastguard Worker
516*57b5a4a6SAndroid Build Coastguard Worker### Native targets for Apple Silicon
517*57b5a4a6SAndroid Build Coastguard Worker
518*57b5a4a6SAndroid Build Coastguard WorkerThis release includes klibs for new targets, introduced in Kotlin/Native 1.5.30 —
519*57b5a4a6SAndroid Build Coastguard Worker`macosArm64`, `iosSimulatorArm64`, `watchosSimulatorArm64`, and `tvosSimulatorArm64`.
520*57b5a4a6SAndroid Build Coastguard Worker
521*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes and improvements
522*57b5a4a6SAndroid Build Coastguard Worker
523*57b5a4a6SAndroid Build Coastguard Worker  * Properly handle quoted 'null' literals in lenient mode (#1637)
524*57b5a4a6SAndroid Build Coastguard Worker  * Switch on deep recursive function when nested level of JSON is too deep (#1596)
525*57b5a4a6SAndroid Build Coastguard Worker  * Support for local serializable classes in IR compiler
526*57b5a4a6SAndroid Build Coastguard Worker  * Support default values for `@SerialInfo` annotations in IR compiler
527*57b5a4a6SAndroid Build Coastguard Worker  * Improve error message for JsonTreeReader (#1597)
528*57b5a4a6SAndroid Build Coastguard Worker  * Add guide for delegating serializers and wrapping serial descriptor (#1591)
529*57b5a4a6SAndroid Build Coastguard Worker  * Set target JVM version to 8 for Hocon module in Gradle metadata (#1661)
530*57b5a4a6SAndroid Build Coastguard Worker
531*57b5a4a6SAndroid Build Coastguard Worker1.2.2 / 2021-07-08
532*57b5a4a6SAndroid Build Coastguard Worker==================
533*57b5a4a6SAndroid Build Coastguard Worker
534*57b5a4a6SAndroid Build Coastguard WorkerThis release contains various bugfixes, some useful features and important performance improvements.
535*57b5a4a6SAndroid Build Coastguard WorkerIt also uses Kotlin 1.5.20 as default.
536*57b5a4a6SAndroid Build Coastguard Worker
537*57b5a4a6SAndroid Build Coastguard Worker### Features
538*57b5a4a6SAndroid Build Coastguard Worker
539*57b5a4a6SAndroid Build Coastguard Worker  * Support for `@JsonNames` and `coerceInputValues` in `Json.decodeFromDynamic` (#1479)
540*57b5a4a6SAndroid Build Coastguard Worker  * Add factory function to wrap a serial descriptor with a custom name for custom delegating serializers (#1547) (thanks to [Fadenfire](https://github.com/Fadenfire))
541*57b5a4a6SAndroid Build Coastguard Worker  * Allow contextually serialized types to be used as map keys in Json (#1552) (thanks to [pdvrieze](https://github.com/pdvrieze))
542*57b5a4a6SAndroid Build Coastguard Worker
543*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes and performance improvements
544*57b5a4a6SAndroid Build Coastguard Worker
545*57b5a4a6SAndroid Build Coastguard Worker  * Update size in `JsonStringBuilder` slow-path to avoid excessive array-copies for large strings with escape symbols (#1491)
546*57b5a4a6SAndroid Build Coastguard Worker  * Optimize integer encoding length in CBOR (#1570) (thanks to [davertay](https://github.com/davertay))
547*57b5a4a6SAndroid Build Coastguard Worker  * Throw `JsonDecodingException` instead of `ClassCastException` during unexpected null in `TreeJsonDecoder` (#1550)
548*57b5a4a6SAndroid Build Coastguard Worker  * Prohibit 'null' strings in lenient mode in order to get rid of 'null' and "null" ambiguity (#1549)
549*57b5a4a6SAndroid Build Coastguard Worker  * Avoid usage of reflective-like `serialDescriptor<KType>` in production sources (#1540)
550*57b5a4a6SAndroid Build Coastguard Worker  * Added correct error message when deserializing missing enum member for Properties format (#1539)
551*57b5a4a6SAndroid Build Coastguard Worker  * Make `DescriptorSchemaCache` in Json thread-local on Native (#1484)
552*57b5a4a6SAndroid Build Coastguard Worker
553*57b5a4a6SAndroid Build Coastguard Worker1.2.1 / 2021-05-14
554*57b5a4a6SAndroid Build Coastguard Worker==================
555*57b5a4a6SAndroid Build Coastguard Worker
556*57b5a4a6SAndroid Build Coastguard WorkerThis release mainly contains bugfixes for various issues, including important [broken thread-safety](https://github.com/Kotlin/kotlinx.serialization/issues/1455) and [improper encoding](https://github.com/Kotlin/kotlinx.serialization/issues/1441).
557*57b5a4a6SAndroid Build Coastguard Worker
558*57b5a4a6SAndroid Build Coastguard Worker### Features
559*57b5a4a6SAndroid Build Coastguard Worker
560*57b5a4a6SAndroid Build Coastguard Worker  * Added support for nullable values, nested and empty collections in protobuf (#1430)
561*57b5a4a6SAndroid Build Coastguard Worker
562*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
563*57b5a4a6SAndroid Build Coastguard Worker
564*57b5a4a6SAndroid Build Coastguard Worker  * Support @JsonNames for enum values (#1473)
565*57b5a4a6SAndroid Build Coastguard Worker  * Handle EOF in skipElement correctly (#1475)
566*57b5a4a6SAndroid Build Coastguard Worker  * Allow using value classes with primitive carriers as map keys (#1470)
567*57b5a4a6SAndroid Build Coastguard Worker  * Read JsonNull only for non-string literals in JsonTreeReader (#1466)
568*57b5a4a6SAndroid Build Coastguard Worker  * Properly reuse JsonStringBuilders in CharArrayPool (#1455)
569*57b5a4a6SAndroid Build Coastguard Worker  * Properly ensure capacity of the string builder on the append slow-path (#1441)
570*57b5a4a6SAndroid Build Coastguard Worker
571*57b5a4a6SAndroid Build Coastguard Worker1.2.0 / 2021-04-27
572*57b5a4a6SAndroid Build Coastguard Worker==================
573*57b5a4a6SAndroid Build Coastguard Worker
574*57b5a4a6SAndroid Build Coastguard Worker**This release has some known critical bugs, so we advise to use 1.2.1 instead.**
575*57b5a4a6SAndroid Build Coastguard Worker
576*57b5a4a6SAndroid Build Coastguard WorkerThis release contains a lot of new features and important improvements listed below;
577*57b5a4a6SAndroid Build Coastguard WorkerKotlin 1.5.0 is used as a default compiler and language version.
578*57b5a4a6SAndroid Build Coastguard Worker
579*57b5a4a6SAndroid Build Coastguard Worker### JSON performance improvements
580*57b5a4a6SAndroid Build Coastguard Worker
581*57b5a4a6SAndroid Build Coastguard WorkerJSON encoder and decoder were revisited and significantly rewritten,
582*57b5a4a6SAndroid Build Coastguard Workerwhich lead us to up to 2-3x times speedup in certain cases.
583*57b5a4a6SAndroid Build Coastguard WorkerAdditional details can be found in the corresponding issues: [[1]](https://github.com/Kotlin/kotlinx.serialization/pull/1343), [[2]](https://github.com/Kotlin/kotlinx.serialization/pull/1354).
584*57b5a4a6SAndroid Build Coastguard Worker
585*57b5a4a6SAndroid Build Coastguard Worker### Ability to specify alternative names during JSON decoding
586*57b5a4a6SAndroid Build Coastguard Worker
587*57b5a4a6SAndroid Build Coastguard Worker[The one of the most voted issues](https://github.com/Kotlin/kotlinx.serialization/issues/203) is fixed now — it is possible to specify multiple names for one property
588*57b5a4a6SAndroid Build Coastguard Workerusing new `@JsonNames` annotation.
589*57b5a4a6SAndroid Build Coastguard WorkerUnlike `@SerialName`, it only affects JSON decoding, so it is useful when dealing with different versions of the API.
590*57b5a4a6SAndroid Build Coastguard WorkerWe've prepared a [documentation](https://github.com/Kotlin/kotlinx.serialization/blob/dev/docs/json.md#alternative-json-names) for you about it.
591*57b5a4a6SAndroid Build Coastguard Worker
592*57b5a4a6SAndroid Build Coastguard Worker### JsonConfiguration in public API
593*57b5a4a6SAndroid Build Coastguard Worker
594*57b5a4a6SAndroid Build Coastguard Worker`JsonConfiguration` is exposed as a property of `Json` instance. You can use it to adjust behavior in
595*57b5a4a6SAndroid Build Coastguard Workeryour [custom serializers](https://github.com/Kotlin/kotlinx.serialization/blob/dev/docs/json.md#maintaining-custom-json-attributes).
596*57b5a4a6SAndroid Build Coastguard WorkerCheck out more in the corresponding [issue](https://github.com/Kotlin/kotlinx.serialization/issues/1361) and the [PR](https://github.com/Kotlin/kotlinx.serialization/pull/1409).
597*57b5a4a6SAndroid Build Coastguard Worker
598*57b5a4a6SAndroid Build Coastguard Worker### Generator for .proto files based on serializable Kotlin classes
599*57b5a4a6SAndroid Build Coastguard Worker
600*57b5a4a6SAndroid Build Coastguard WorkerOur implementation of Protocol Buffers format uses `@Serializable` Kotlin classes as a source of schema.
601*57b5a4a6SAndroid Build Coastguard WorkerThis is very convenient for Kotlin-to-Kotlin communication, but makes interoperability between languages complicated.
602*57b5a4a6SAndroid Build Coastguard WorkerTo resolve this [issue](https://github.com/Kotlin/kotlinx.serialization/issues/34), we now have a
603*57b5a4a6SAndroid Build Coastguard Workerschema generator that can produce .proto files out of Kotlin classes. Using it, you can keep Kotlin
604*57b5a4a6SAndroid Build Coastguard Workerclasses as a source of truth and use traditional protoc compilers for other languages at the same time.
605*57b5a4a6SAndroid Build Coastguard WorkerTo learn more, check out the documentation for the new `ProtoBufSchemaGenerator` class or
606*57b5a4a6SAndroid Build Coastguard Workervisit the [corresponding PR](https://github.com/Kotlin/kotlinx.serialization/pull/1255).
607*57b5a4a6SAndroid Build Coastguard Worker
608*57b5a4a6SAndroid Build Coastguard Worker>Note: this generator is on its experimental stage and any feedback is very welcomed.
609*57b5a4a6SAndroid Build Coastguard Worker
610*57b5a4a6SAndroid Build Coastguard Worker### Contextual serialization of generic classes
611*57b5a4a6SAndroid Build Coastguard Worker
612*57b5a4a6SAndroid Build Coastguard WorkerBefore 1.2.0, it was [impossible](https://github.com/Kotlin/kotlinx.serialization/issues/1407) to register context serializer for generic class,
613*57b5a4a6SAndroid Build Coastguard Workerbecause `contextual` function accepted a single serializer.
614*57b5a4a6SAndroid Build Coastguard WorkerNow it is possible to register a provider — lambda that allows to construct a serializer for generic class
615*57b5a4a6SAndroid Build Coastguard Workerout of its type arguments serializers. See the details in the [documentation](https://github.com/Kotlin/kotlinx.serialization/blob/dev/docs/serializers.md#contextual-serialization-and-generic-classes).
616*57b5a4a6SAndroid Build Coastguard Worker
617*57b5a4a6SAndroid Build Coastguard Worker### Other features
618*57b5a4a6SAndroid Build Coastguard Worker
619*57b5a4a6SAndroid Build Coastguard Worker  * Support for watchosX64 target (#1366).
620*57b5a4a6SAndroid Build Coastguard Worker  * Introduce kotlinx-serialization-bom (#1356).
621*57b5a4a6SAndroid Build Coastguard Worker  * Support serializer<T> on JS IR when T is an interface (#1431).
622*57b5a4a6SAndroid Build Coastguard Worker
623*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
624*57b5a4a6SAndroid Build Coastguard Worker
625*57b5a4a6SAndroid Build Coastguard Worker  * Fix serializer lookup by KType for third party classes (#1397) (thanks to [mvdbos](https://github.com/mvdbos)).
626*57b5a4a6SAndroid Build Coastguard Worker  * Fix inability to encode/decode inline class with string to JsonElement (#1408).
627*57b5a4a6SAndroid Build Coastguard Worker  * Throw SerializationException instead of AIOB in ProtoBuf (#1373).
628*57b5a4a6SAndroid Build Coastguard Worker  * Fix numeric overflow in JsonLexer (#1367) (thanks to [EdwarDDay](https://github.com/EdwarDDay)).
629*57b5a4a6SAndroid Build Coastguard Worker
630*57b5a4a6SAndroid Build Coastguard Worker
631*57b5a4a6SAndroid Build Coastguard Worker1.1.0 / 2021-02-17
632*57b5a4a6SAndroid Build Coastguard Worker==================
633*57b5a4a6SAndroid Build Coastguard Worker
634*57b5a4a6SAndroid Build Coastguard WorkerThis release contains all features and bugfixes from 1.1.0-RC plus an additional fix for incorrect exception type
635*57b5a4a6SAndroid Build Coastguard Worker(#1325 — Throw `SerializationException` instead of `IllegalStateException` in `EnumSerializer`) and uses release version of Kotlin 1.4.30.
636*57b5a4a6SAndroid Build Coastguard Worker
637*57b5a4a6SAndroid Build Coastguard WorkerIn the light of [JCenter shutdown](https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/), starting from 1.1.0-RC and now on,
638*57b5a4a6SAndroid Build Coastguard Workerall new releases of kotlinx.serialization are published directly to Maven Central and therefore are not available in `https://kotlin.bintray.com/kotlinx/` repository.
639*57b5a4a6SAndroid Build Coastguard WorkerWe suggest you to remove `jcenter()` and other kotlin bintray repositories from your buildscripts and to use `mavenCentral()` repository instead.
640*57b5a4a6SAndroid Build Coastguard Worker
641*57b5a4a6SAndroid Build Coastguard Worker1.1.0-RC / 2021-02-03
642*57b5a4a6SAndroid Build Coastguard Worker==================
643*57b5a4a6SAndroid Build Coastguard Worker
644*57b5a4a6SAndroid Build Coastguard WorkerThis is a release candidate of 1.1.0 version. Note that final 1.1.0 version may include more features and bugfixes,
645*57b5a4a6SAndroid Build Coastguard Workerwhich would be listed in the corresponding changelog.
646*57b5a4a6SAndroid Build Coastguard Worker
647*57b5a4a6SAndroid Build Coastguard Worker### Kotlin version requirement updated
648*57b5a4a6SAndroid Build Coastguard Worker
649*57b5a4a6SAndroid Build Coastguard WorkerDue to changes in calling conventions between compiler plugin and serialization core runtime, this release requires
650*57b5a4a6SAndroid Build Coastguard WorkerKotlin version at least 1.4.30-M1. However, this changes should not affect your code,
651*57b5a4a6SAndroid Build Coastguard Workerbecause only deprecated functions were removed from public API.
652*57b5a4a6SAndroid Build Coastguard WorkerSee [corresponding PR](https://github.com/Kotlin/kotlinx.serialization/pull/1260) for the details.
653*57b5a4a6SAndroid Build Coastguard Worker
654*57b5a4a6SAndroid Build Coastguard Worker### Experimental support for inline classes (IR only)
655*57b5a4a6SAndroid Build Coastguard Worker
656*57b5a4a6SAndroid Build Coastguard WorkerUsing 1.1.0-RC, you can mark inline classes as `@Serializable` and use them in other serializable classes.
657*57b5a4a6SAndroid Build Coastguard WorkerUnsigned integer types (`UByte`, `UShort`, `UInt` and `ULong`) are serializable as well and have special support in JSON.
658*57b5a4a6SAndroid Build Coastguard WorkerThis feature requires Kotlin compiler 1.4.30-RC and enabling new IR compilers for [JS](https://kotlinlang.org/docs/reference/js-ir-compiler.html) and [JVM](https://kotlinlang.org/docs/reference/whatsnew14.html#new-jvm-ir-backend).
659*57b5a4a6SAndroid Build Coastguard Worker
660*57b5a4a6SAndroid Build Coastguard WorkerYou can learn more in the [documentation](docs/value-classes.md)
661*57b5a4a6SAndroid Build Coastguard Workerand corresponding [pull request](https://github.com/Kotlin/kotlinx.serialization/pull/1244).
662*57b5a4a6SAndroid Build Coastguard Worker
663*57b5a4a6SAndroid Build Coastguard Worker### Other features
664*57b5a4a6SAndroid Build Coastguard Worker
665*57b5a4a6SAndroid Build Coastguard Worker  * Add `serializerOrNull` function for `KType` and `Type` arguments (#1164)
666*57b5a4a6SAndroid Build Coastguard Worker  * Allow shared prefix names in `Properties` (#1183) (thanks to [TorRanfelt](https://github.com/TorRanfelt))
667*57b5a4a6SAndroid Build Coastguard Worker  * Add support for encoding/decoding `Properties` values as Strings (#1158) (thanks to [daniel-jasinski](https://github.com/daniel-jasinski))
668*57b5a4a6SAndroid Build Coastguard Worker
669*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes and performance improvements
670*57b5a4a6SAndroid Build Coastguard Worker
671*57b5a4a6SAndroid Build Coastguard Worker  * Support contextual serialization for derived classes (#1277) (thanks to [Martin Raison](https://github.com/martinraison))
672*57b5a4a6SAndroid Build Coastguard Worker  * Ensure serialization is usable from K/N background thread (#1282)
673*57b5a4a6SAndroid Build Coastguard Worker  * Fail on primitive type overflow during `JsonElement` deserialization (#1300)
674*57b5a4a6SAndroid Build Coastguard Worker  * Throw `SerializationException` instead of ISE when encountering an invalid boolean in JSON (#1299)
675*57b5a4a6SAndroid Build Coastguard Worker  * Optimize the loop for writing large varints in `ProtoBuf` (#1294)
676*57b5a4a6SAndroid Build Coastguard Worker  * Fix serializing property with custom accessors and backing field (#1197)
677*57b5a4a6SAndroid Build Coastguard Worker  * Optimize check for missing fields in deserialization and improve `MissingFieldException` message (#1153)
678*57b5a4a6SAndroid Build Coastguard Worker  * Improved support of nullable serializer in `@UseSerializers` annotation  (#1195)
679*57b5a4a6SAndroid Build Coastguard Worker  * Correctly escape keys in `JsonObject.toString()` (#1246) (thanks to [Karlatemp](https://github.com/Karlatemp))
680*57b5a4a6SAndroid Build Coastguard Worker  * Treat `Collection` as `ArrayList` in serializer by type lookups (#1257)
681*57b5a4a6SAndroid Build Coastguard Worker  * Do not try to end structure in encode/decode structure extensions if an exception has been thrown, so the original exception will be propagated (#1201)
682*57b5a4a6SAndroid Build Coastguard Worker  * Properly cache serial names in order to improve performance of JSON parser with strict mode (#1209)
683*57b5a4a6SAndroid Build Coastguard Worker  * Fix dynamic serialization for nullable values (#1199) (thanks to [ankushg](https://github.com/ankushg))
684*57b5a4a6SAndroid Build Coastguard Worker
685*57b5a4a6SAndroid Build Coastguard Worker1.0.1 / 2020-10-28
686*57b5a4a6SAndroid Build Coastguard Worker==================
687*57b5a4a6SAndroid Build Coastguard Worker
688*57b5a4a6SAndroid Build Coastguard WorkerThis patch release contains several feature improvements as well as bugfixes and performance improvements.
689*57b5a4a6SAndroid Build Coastguard Worker
690*57b5a4a6SAndroid Build Coastguard Worker### Features
691*57b5a4a6SAndroid Build Coastguard Worker  * Add object-based serialization and deserialization of polymorphic types for `dynamic` conversions on JS platform  (#1122)
692*57b5a4a6SAndroid Build Coastguard Worker  * Add support for object polymorphism in HOCON decoder (#1136)
693*57b5a4a6SAndroid Build Coastguard Worker  * Add support of decoding map in the root of HOCON config (#1106)
694*57b5a4a6SAndroid Build Coastguard Worker
695*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes
696*57b5a4a6SAndroid Build Coastguard Worker  * Properly cache generated serializers in PluginGeneratedSerialDescriptor (#1159)
697*57b5a4a6SAndroid Build Coastguard Worker  * Add Pair and Triple to serializer resolving from Java type token (#1160)
698*57b5a4a6SAndroid Build Coastguard Worker  * Fix deserialization of half-precision, float and double types in CBOR  (#1112)
699*57b5a4a6SAndroid Build Coastguard Worker  * Fix ByteString annotation detection when ByteArray is nullable (#1139)
700*57b5a4a6SAndroid Build Coastguard Worker
701*57b5a4a6SAndroid Build Coastguard Worker1.0.0 / 2020-10-08
702*57b5a4a6SAndroid Build Coastguard Worker==================
703*57b5a4a6SAndroid Build Coastguard Worker
704*57b5a4a6SAndroid Build Coastguard WorkerThe first public stable release, yay!
705*57b5a4a6SAndroid Build Coastguard WorkerThe definitions of stability and backwards compatibility guarantees are located in the [corresponding document](docs/compatibility.md).
706*57b5a4a6SAndroid Build Coastguard WorkerWe now also have a GitHub Pages site with [full API reference](https://kotlinlang.org/api/kotlinx.serialization/).
707*57b5a4a6SAndroid Build Coastguard Worker
708*57b5a4a6SAndroid Build Coastguard WorkerCompared to RC2, no new features apart from #947 were added and all previously deprecated declarations and migrations were deleted.
709*57b5a4a6SAndroid Build Coastguard WorkerIf you are using RC/RC2 along with deprecated declarations, please, migrate before updating to 1.0.0.
710*57b5a4a6SAndroid Build Coastguard WorkerIn case you are using pre-1.0 versions (e.g. 0.20.0), please refer to our [migration guide](docs/migration.md).
711*57b5a4a6SAndroid Build Coastguard Worker
712*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes and improvements
713*57b5a4a6SAndroid Build Coastguard Worker
714*57b5a4a6SAndroid Build Coastguard Worker  * Support nullable types at top-level for JsonElement decoding (#1117)
715*57b5a4a6SAndroid Build Coastguard Worker  * Add CBOR ignoreUnknownKeys option (#947) (thanks to [Travis Wyatt](https://github.com/twyatt))
716*57b5a4a6SAndroid Build Coastguard Worker  * Fix incorrect documentation of `encodeDefaults` (#1108) (thanks to [Anders Carling](https://github.com/anderscarling))
717*57b5a4a6SAndroid Build Coastguard Worker
718*57b5a4a6SAndroid Build Coastguard Worker1.0.0-RC2 / 2020-09-21
719*57b5a4a6SAndroid Build Coastguard Worker==================
720*57b5a4a6SAndroid Build Coastguard Worker
721*57b5a4a6SAndroid Build Coastguard WorkerSecond release candidate for 1.0.0 version. This RC contains tweaks and changes based on users feedback after 1.0.0-RC.
722*57b5a4a6SAndroid Build Coastguard Worker
723*57b5a4a6SAndroid Build Coastguard Worker### Major changes
724*57b5a4a6SAndroid Build Coastguard Worker
725*57b5a4a6SAndroid Build Coastguard Worker* JSON format is now located in different artifact (#994)
726*57b5a4a6SAndroid Build Coastguard Worker
727*57b5a4a6SAndroid Build Coastguard WorkerIn 1.0.0-RC, the `kotlinx-serialization-core` artifact contained core serialization entities as well as `Json` serial format.
728*57b5a4a6SAndroid Build Coastguard WorkerWe've decided to change that and to make `core` format-agnostic.
729*57b5a4a6SAndroid Build Coastguard WorkerIt would make the life easier for those who use other serial formats and also make possible to write your own implementation of JSON
730*57b5a4a6SAndroid Build Coastguard Workeror another format without unnecessary dependency on the default one.
731*57b5a4a6SAndroid Build Coastguard Worker
732*57b5a4a6SAndroid Build Coastguard WorkerIn 1.0.0-RC2, `Json` class and related entities are located in `kotlinx-serialization-json` artifact.
733*57b5a4a6SAndroid Build Coastguard WorkerTo migrate, simply replace `kotlinx-serialization-core` dependency with `-json`. Core library then will be included automatically
734*57b5a4a6SAndroid Build Coastguard Workeras the transitive dependency.
735*57b5a4a6SAndroid Build Coastguard Worker
736*57b5a4a6SAndroid Build Coastguard WorkerFor most use-cases, you should use new `kotlinx-serialization-json` artifact. Use `kotlinx-serialization-core` if you are
737*57b5a4a6SAndroid Build Coastguard Workerwriting a library that depends on kotlinx.serialization in a format-agnostic way of provides its own serial format.
738*57b5a4a6SAndroid Build Coastguard Worker
739*57b5a4a6SAndroid Build Coastguard Worker* `encodeDefaults` flag is now set to `false` in the default configuration for JSON, CBOR and Protocol Buffers.
740*57b5a4a6SAndroid Build Coastguard Worker
741*57b5a4a6SAndroid Build Coastguard WorkerThe change is motivated by the fact that in most real-life scenarios, this flag is set to `false` anyway,
742*57b5a4a6SAndroid Build Coastguard Workerbecause such configuration reduces visual clutter and saves amount of data being serialized.
743*57b5a4a6SAndroid Build Coastguard WorkerOther libraries, like GSON and Moshi, also have this behavior by default.
744*57b5a4a6SAndroid Build Coastguard Worker
745*57b5a4a6SAndroid Build Coastguard WorkerThis may change how your serialized data looks like, if you have not set value for `encodeDefaults` flag explicitly.
746*57b5a4a6SAndroid Build Coastguard WorkerWe anticipate that most users already had done this, so no migration is required.
747*57b5a4a6SAndroid Build Coastguard WorkerIn case you need to return to the old behavior, simply add `encodeDefaults = true` to your configuration while creating `Json/Cbor/ProtoBuf` object.
748*57b5a4a6SAndroid Build Coastguard Worker
749*57b5a4a6SAndroid Build Coastguard Worker* Move `Json.encodeToDynamic/Json.decodeFromDynamic` functions to json package
750*57b5a4a6SAndroid Build Coastguard Worker
751*57b5a4a6SAndroid Build Coastguard WorkerSince these functions are no longer exposed via `DynamicObjectParser/Serializer` and they are now `Json` class extensions,
752*57b5a4a6SAndroid Build Coastguard Workerthey should be moved to `kotlinx.serialization.json` package.
753*57b5a4a6SAndroid Build Coastguard WorkerTo migrate, simply add `import kotlinx.serialization.json.*` to your files.
754*57b5a4a6SAndroid Build Coastguard Worker
755*57b5a4a6SAndroid Build Coastguard Worker
756*57b5a4a6SAndroid Build Coastguard Worker### Bugfixes and improvements
757*57b5a4a6SAndroid Build Coastguard Worker
758*57b5a4a6SAndroid Build Coastguard Worker  * Do not provide default implementation for serializersModule in AbstractEncoder/Decoder (#1089)
759*57b5a4a6SAndroid Build Coastguard Worker  * Support JsonElement hierarchy in `dynamic` encoding/decoding (#1080)
760*57b5a4a6SAndroid Build Coastguard Worker  * Support top-level primitives and primitive map keys in `dynamic` encoding/decoding
761*57b5a4a6SAndroid Build Coastguard Worker  * Change core annotations retention (#1083)
762*57b5a4a6SAndroid Build Coastguard Worker  * Fix 'Duplicate class ... found in modules' on Gradle != 6.1.1 (#996)
763*57b5a4a6SAndroid Build Coastguard Worker  * Various documentation clarifications
764*57b5a4a6SAndroid Build Coastguard Worker  * Support deserialization of top-level nullable types (#1038)
765*57b5a4a6SAndroid Build Coastguard Worker  * Make most serialization exceptions eligible for coroutines exception recovery (#1054)
766*57b5a4a6SAndroid Build Coastguard Worker  * Get rid of methods that do not present in Android API<24 (#1013, #1040)
767*57b5a4a6SAndroid Build Coastguard Worker  * Throw JsonDecodingException on empty string literal at the end of the input (#1011)
768*57b5a4a6SAndroid Build Coastguard Worker  * Remove new lines in deprecation warnings that caused errors in ObjC interop (#990)
769*57b5a4a6SAndroid Build Coastguard Worker
770*57b5a4a6SAndroid Build Coastguard Worker1.0.0-RC / 2020-08-17
771*57b5a4a6SAndroid Build Coastguard Worker==================
772*57b5a4a6SAndroid Build Coastguard Worker
773*57b5a4a6SAndroid Build Coastguard WorkerRelease candidate for 1.0.0 version. The goal of RC release is to collect feedback from users
774*57b5a4a6SAndroid Build Coastguard Workerand provide 1.0.0 release with bug fixes and improvements based on that feedback.
775*57b5a4a6SAndroid Build Coastguard Worker
776*57b5a4a6SAndroid Build Coastguard WorkerWhile working on 1.0.0 version, we carefully examined every public API declaration of the library and
777*57b5a4a6SAndroid Build Coastguard Workersplit it to stable API, that we promise to be source and binary-compatible,
778*57b5a4a6SAndroid Build Coastguard Workerand experimental API, that may be changed in the future.
779*57b5a4a6SAndroid Build Coastguard WorkerExperimental API is annotated with `@ExperimentalSerializationApi` annotation, which requires opt-in.
780*57b5a4a6SAndroid Build Coastguard WorkerFor a more detailed description of the guarantees, please refer to the [compatibility guide](docs/compatibility.md).
781*57b5a4a6SAndroid Build Coastguard Worker
782*57b5a4a6SAndroid Build Coastguard WorkerThe id of the core artifact with `@Serializable` annotation and `Json` format was changed
783*57b5a4a6SAndroid Build Coastguard Workerfrom `kotlinx-serialization-runtime` to `kotlinx-serialization-core` to be more clear and aligned with other kotlinx libraries.
784*57b5a4a6SAndroid Build Coastguard Worker
785*57b5a4a6SAndroid Build Coastguard WorkerA significant part of the public API was renamed or extracted to a separate package.
786*57b5a4a6SAndroid Build Coastguard WorkerTo migrate from the previous versions of the library, please refer to the [migration guide](docs/migration.md).
787*57b5a4a6SAndroid Build Coastguard Worker
788*57b5a4a6SAndroid Build Coastguard Worker### API changes
789*57b5a4a6SAndroid Build Coastguard Worker
790*57b5a4a6SAndroid Build Coastguard Worker#### Json
791*57b5a4a6SAndroid Build Coastguard Worker
792*57b5a4a6SAndroid Build Coastguard Worker* Core API changes
793*57b5a4a6SAndroid Build Coastguard Worker    * `stringify` and `parse` are renamed to `encodeToString` and `decodeFromString`
794*57b5a4a6SAndroid Build Coastguard Worker    * `parseJson` and `fromJson` are renamed to `parseToJsonElement` and `decodeFromJsonElement`
795*57b5a4a6SAndroid Build Coastguard Worker    * Reified versions of methods are extracted to extensions
796*57b5a4a6SAndroid Build Coastguard Worker
797*57b5a4a6SAndroid Build Coastguard Worker* `Json` constructor is replaced with `Json {}` builder function, `JsonConfiguration` is deprecated in favor
798*57b5a4a6SAndroid Build Coastguard Workerof `Json {}` builder
799*57b5a4a6SAndroid Build Coastguard Worker    * All default `Json` implementations are removed
800*57b5a4a6SAndroid Build Coastguard Worker   * `Json` companion object extends `Json`
801*57b5a4a6SAndroid Build Coastguard Worker
802*57b5a4a6SAndroid Build Coastguard Worker* Json configuration
803*57b5a4a6SAndroid Build Coastguard Worker    * `prettyPrintIndent` allows only whitespaces
804*57b5a4a6SAndroid Build Coastguard Worker    * `serializeSpecialFloatingPointValues` is renamed to `allowSpecialFloatingPointValues`. It now affects both serialization and deserialization behaviour
805*57b5a4a6SAndroid Build Coastguard Worker    * `unquoted` JSON flag is deprecated for removal
806*57b5a4a6SAndroid Build Coastguard Worker    * New `coerceInputValues` option for null-defaults and unknown enums (#90, #246)
807*57b5a4a6SAndroid Build Coastguard Worker
808*57b5a4a6SAndroid Build Coastguard Worker* Simplification of `JsonElement` API
809*57b5a4a6SAndroid Build Coastguard Worker    * Redundant members of `JsonElement` API are deprecated or extracted to extensions
810*57b5a4a6SAndroid Build Coastguard Worker    * Potential error-prone API is removed
811*57b5a4a6SAndroid Build Coastguard Worker    * `JsonLiteral` is deprecated in favor of `JsonPrimitive` constructors with nullable parameter
812*57b5a4a6SAndroid Build Coastguard Worker
813*57b5a4a6SAndroid Build Coastguard Worker* `JsonElement` builders rework to be aligned with stdlib collection builders (#418, #627)
814*57b5a4a6SAndroid Build Coastguard Worker    * Deprecated infix `to` and unaryPlus in JSON DSL in favor of `put`/`add` functions
815*57b5a4a6SAndroid Build Coastguard Worker    * `jsonObject {}` and `json {}` builders are renamed to `buildJsonObject {}` and `buildJsonArray {}`
816*57b5a4a6SAndroid Build Coastguard Worker    * Make all builders `inline` (#703)
817*57b5a4a6SAndroid Build Coastguard Worker
818*57b5a4a6SAndroid Build Coastguard Worker* JavaScript support
819*57b5a4a6SAndroid Build Coastguard Worker    * `DynamicObjectParser` is deprecated in the favor of `Json.decodeFromDynamic` extension functions
820*57b5a4a6SAndroid Build Coastguard Worker    * `Json.encodeToDynamic` extension is added as a counterpart to `Json.decodeFromDynamic` (former `DynamicObjectParser`) (#116)
821*57b5a4a6SAndroid Build Coastguard Worker
822*57b5a4a6SAndroid Build Coastguard Worker* Other API changes:
823*57b5a4a6SAndroid Build Coastguard Worker    * `JsonInput` and `JsonOutput` are renamed to `JsonDecoder` and `JsonEncoder`
824*57b5a4a6SAndroid Build Coastguard Worker    * Methods in `JsonTransformingSerializer` are renamed to `transformSerialize` and `transformDeserialize`
825*57b5a4a6SAndroid Build Coastguard Worker    * `JsonParametricSerializer` is renamed to `JsonContentPolymorphicSerializer`
826*57b5a4a6SAndroid Build Coastguard Worker    * `JsonEncodingException` and `JsonDecodingException` are made internal
827*57b5a4a6SAndroid Build Coastguard Worker
828*57b5a4a6SAndroid Build Coastguard Worker* Bug fixes
829*57b5a4a6SAndroid Build Coastguard Worker    * `IllegalStateException` when `null` occurs in JSON input in the place of an expected non-null object (#816)
830*57b5a4a6SAndroid Build Coastguard Worker    * java.util.NoSuchElementException when deserializing twice from the same JsonElement (#807)
831*57b5a4a6SAndroid Build Coastguard Worker
832*57b5a4a6SAndroid Build Coastguard Worker#### Core API for format authoring
833*57b5a4a6SAndroid Build Coastguard Worker
834*57b5a4a6SAndroid Build Coastguard Worker* The new naming scheme for `SerialFormats`
835*57b5a4a6SAndroid Build Coastguard Worker   *  Core functions in `StringFormat` and `BinaryFormat` are renamed and now follow the same naming scheme
836*57b5a4a6SAndroid Build Coastguard Worker   * `stringify`/`parse` are renamed to `encodeToString`/`decodeFromString`
837*57b5a4a6SAndroid Build Coastguard Worker   * `encodeToByteArray`/`encodeToHexString`/`decodeFromByteArray`/`decodeFromHexString` in `BinaryFormat` are introduced instead of `dump`/`dumps`/`load`/`loads`
838*57b5a4a6SAndroid Build Coastguard Worker
839*57b5a4a6SAndroid Build Coastguard Worker* New format instances building convention
840*57b5a4a6SAndroid Build Coastguard Worker   * Constructors replaced with builder-function with the same name to have the ability to add new configuration parameters,
841*57b5a4a6SAndroid Build Coastguard Worker   while preserving both source and binary compatibility
842*57b5a4a6SAndroid Build Coastguard Worker   * Format's companion objects now extend format class and can be used interchangeably
843*57b5a4a6SAndroid Build Coastguard Worker
844*57b5a4a6SAndroid Build Coastguard Worker* SerialDescriptor-related API
845*57b5a4a6SAndroid Build Coastguard Worker    * `SerialDescriptor` and `SerialKind` are moved to a separate `kotlinx.serialization.descriptors` package
846*57b5a4a6SAndroid Build Coastguard Worker    * `ENUM` and `CONTEXTUAL` kinds now extend `SerialKind` directly
847*57b5a4a6SAndroid Build Coastguard Worker    * `PrimitiveDescriptor` is renamed to `PrimitiveSerialDescriptor`
848*57b5a4a6SAndroid Build Coastguard Worker    * Provide specific `buildClassSerialDescriptor` to use with classes' custom serializers, creating other kinds is considered experimental for now
849*57b5a4a6SAndroid Build Coastguard Worker    * Replace extensions that returned lists (e.g. `elementDescriptors`) with properties that return iterable as an optimization
850*57b5a4a6SAndroid Build Coastguard Worker    * `IndexOutOfBoundsException` in `descriptor.getElementDescriptor(index)` for `List` after upgrade to 0.20.0 is fixed (#739)
851*57b5a4a6SAndroid Build Coastguard Worker
852*57b5a4a6SAndroid Build Coastguard Worker* SerializersModule-related API
853*57b5a4a6SAndroid Build Coastguard Worker    * `SerialModule` is renamed to `SerializersModule`
854*57b5a4a6SAndroid Build Coastguard Worker    * `SerialModuleCollector` is renamed to `SerializersModuleCollector`
855*57b5a4a6SAndroid Build Coastguard Worker    * All builders renamed to be aligned with a single naming scheme (e.g. `SerializersModule {}` DSL)
856*57b5a4a6SAndroid Build Coastguard Worker    * Deprecate infix `with` in polymorphic builder in favor of subclass()
857*57b5a4a6SAndroid Build Coastguard Worker    * Helper-like API is extracted to extension functions where possible.
858*57b5a4a6SAndroid Build Coastguard Worker    * `polymorphicDefault` API for cases when type discriminator is not registered or absent (#902)
859*57b5a4a6SAndroid Build Coastguard Worker
860*57b5a4a6SAndroid Build Coastguard Worker* Contextual serialization
861*57b5a4a6SAndroid Build Coastguard Worker    * `@ContextualSerialization` is split into two annotations: `@Contextual` to use on properties and `@UseContextualSerialization` to use on file
862*57b5a4a6SAndroid Build Coastguard Worker    *  New `SerialDescriptor.capturedKClass` API to introspect SerializersModule-based contextual and polymorphic kinds (#515, #595)
863*57b5a4a6SAndroid Build Coastguard Worker
864*57b5a4a6SAndroid Build Coastguard Worker* Encoding-related API
865*57b5a4a6SAndroid Build Coastguard Worker    * Encoding-related classes (`Encoder`, `Decoder`, `AbstractEncoder`, `AbstractDecoder`) are moved to a separate `kotlinx.serialization.encoding` package
866*57b5a4a6SAndroid Build Coastguard Worker    * Deprecated `typeParameters` argument in `beginStructure`/`beginCollectio`n methods
867*57b5a4a6SAndroid Build Coastguard Worker    * Deprecated `updateSerializableValue` and similar methods and `UpdateMode` enum
868*57b5a4a6SAndroid Build Coastguard Worker    * Renamed `READ_DONE` to `DECODE_DONE`
869*57b5a4a6SAndroid Build Coastguard Worker    * Make extensions `inline` where applicable
870*57b5a4a6SAndroid Build Coastguard Worker    * `kotlinx.io` mockery (`InputStream`, `ByteArrayInput`, etc) is removed
871*57b5a4a6SAndroid Build Coastguard Worker
872*57b5a4a6SAndroid Build Coastguard Worker* Serializer-related API
873*57b5a4a6SAndroid Build Coastguard Worker    * `UnitSerializer` is replaced with `Unit.serializer()`
874*57b5a4a6SAndroid Build Coastguard Worker    * All methods for serializers retrieval are renamed to `serializer`
875*57b5a4a6SAndroid Build Coastguard Worker    * Context is used as a fallback in `serializer` by KType/Java's Reflect Type functions (#902, #903)
876*57b5a4a6SAndroid Build Coastguard Worker    * Deprecated all exceptions except `SerializationException`.
877*57b5a4a6SAndroid Build Coastguard Worker    * `@ImplicitReflectionSerializer` is deprecated
878*57b5a4a6SAndroid Build Coastguard Worker    * Support of custom serializers for nullable types is added (#824)
879*57b5a4a6SAndroid Build Coastguard Worker
880*57b5a4a6SAndroid Build Coastguard Worker#### ProtoBuf
881*57b5a4a6SAndroid Build Coastguard Worker
882*57b5a4a6SAndroid Build Coastguard Worker* `ProtoBuf` constructor is replaced with `ProtoBuf {}` builder function
883*57b5a4a6SAndroid Build Coastguard Worker* `ProtoBuf` companion object now extends `ProtoBuf`
884*57b5a4a6SAndroid Build Coastguard Worker* `ProtoId` is renamed to `ProtoNumber`, `ProtoNumberType` to `ProtoIntegerType` to be consistent with ProtoBuf specification
885*57b5a4a6SAndroid Build Coastguard Worker* ProtoBuf performance is significantly (from 2 to 10 times) improved (#216)
886*57b5a4a6SAndroid Build Coastguard Worker* Top-level primitives, classes and objects are supported in ProtoBuf as length-prefixed tagless messages (#93)
887*57b5a4a6SAndroid Build Coastguard Worker* `SerializationException` is thrown instead of `IllegalStateException` on incorrect input (#870)
888*57b5a4a6SAndroid Build Coastguard Worker* `ProtobufDecodingException` is made internal
889*57b5a4a6SAndroid Build Coastguard Worker
890*57b5a4a6SAndroid Build Coastguard Worker#### Other formats
891*57b5a4a6SAndroid Build Coastguard Worker   * All format constructors are migrated to builder scheme
892*57b5a4a6SAndroid Build Coastguard Worker   * Properties serialize and deserialize enums as strings (#818)
893*57b5a4a6SAndroid Build Coastguard Worker   * CBOR major type 2 (byte string) support (#842)
894*57b5a4a6SAndroid Build Coastguard Worker   * `ConfigParser` is renamed to `Hocon`, `kotlinx-serialization-runtime-configparser` artifact is renamed to `kotlinx-serialization-hocon`
895*57b5a4a6SAndroid Build Coastguard Worker   * Do not write/read size of collection into Properties' map (#743)
896*57b5a4a6SAndroid Build Coastguard Worker
897*57b5a4a6SAndroid Build Coastguard Worker0.20.0 / 2020-03-04
898*57b5a4a6SAndroid Build Coastguard Worker==================
899*57b5a4a6SAndroid Build Coastguard Worker
900*57b5a4a6SAndroid Build Coastguard Worker### Release notes
901*57b5a4a6SAndroid Build Coastguard Worker
902*57b5a4a6SAndroid Build Coastguard Worker0.20.0 release is focused on giving a library its final and stable API shape.
903*57b5a4a6SAndroid Build Coastguard Worker
904*57b5a4a6SAndroid Build Coastguard WorkerWe have carefully evaluated every `public` declaration and
905*57b5a4a6SAndroid Build Coastguard Workerdecided whether it should be publicly available. As a result, some declarations were deprecated with an intention of removing
906*57b5a4a6SAndroid Build Coastguard Workerthem from public API because they are going to be replaced with others, more valuable and useful for users.
907*57b5a4a6SAndroid Build Coastguard Worker
908*57b5a4a6SAndroid Build Coastguard WorkerDeprecated symbols include:
909*57b5a4a6SAndroid Build Coastguard Worker - Pre-defined JSON instances like `nonStrict` — `strictMode` was split to 3 separate, more granular, flags.
910*57b5a4a6SAndroid Build Coastguard WorkerUsers are encouraged to create their own configuration;
911*57b5a4a6SAndroid Build Coastguard Worker - Top-level serializers like `IntSerializer` and `ArrayListSerializer`.
912*57b5a4a6SAndroid Build Coastguard WorkerThey were replaced with constructor-like factory functions.
913*57b5a4a6SAndroid Build Coastguard Worker - `SerialClassDescImpl` creation class replaced with `SerialDescriptor`
914*57b5a4a6SAndroid Build Coastguard Workerbuilder function to ease writing of custom serializers and maintain `SerialDescriptor` contract.
915*57b5a4a6SAndroid Build Coastguard Worker - Internal utilities, like HexConverter and ByteBuffer, were deprecated as not relevant to serialization public API.
916*57b5a4a6SAndroid Build Coastguard Worker - Add-on formats like Protobuf, CBOR and Properties (formerly Mapper)
917*57b5a4a6SAndroid Build Coastguard Workerare now extracted to [separate artifacts](formats/README.md#protobuf) to keep the core API lightweight.
918*57b5a4a6SAndroid Build Coastguard Worker
919*57b5a4a6SAndroid Build Coastguard WorkerWe have spent a lot of effort into the quality,
920*57b5a4a6SAndroid Build Coastguard Workerdocumenting most of the core interfaces, establishing their contracts,
921*57b5a4a6SAndroid Build Coastguard Workerfixing numerous of bugs, and even introducing new features that may be useful for those of you who
922*57b5a4a6SAndroid Build Coastguard Workerwrite custom serializers — see [JsonTransformingSerializer](docs/json_transformations.md).
923*57b5a4a6SAndroid Build Coastguard Worker
924*57b5a4a6SAndroid Build Coastguard WorkerSuch API changes, of course, may be not backwards-compatible in some places, in particular, between compiler plugin and runtime.
925*57b5a4a6SAndroid Build Coastguard WorkerGiven that the library is still is in the experimental phase, we took the liberty to introduce breaking changes in order to give users
926*57b5a4a6SAndroid Build Coastguard Workerthe better, more convenient API. Therefore, this release has number `0.20.0` instead of `0.15.0`;
927*57b5a4a6SAndroid Build Coastguard WorkerKotlin 1.3.70 is compatible _only_ with this release.
928*57b5a4a6SAndroid Build Coastguard Worker
929*57b5a4a6SAndroid Build Coastguard WorkerTo migrate:
930*57b5a4a6SAndroid Build Coastguard Worker1. Replace `import kotlinx.serialization.internal.*` with `import kotlinx.serialization.builtins.*`.
931*57b5a4a6SAndroid Build Coastguard WorkerThis action is sufficient for most of the cases, except primitive serializers — instead of using `IntSerializer`, use `Int.serializer()`.
932*57b5a4a6SAndroid Build Coastguard WorkerFor other object-like declarations, you may need to transform it to function call: `ByteArraySerializer` => `ByteArraySerializer()`.
933*57b5a4a6SAndroid Build Coastguard Worker
934*57b5a4a6SAndroid Build Coastguard Worker2. Pay attention to the changed `JsonConfiguration` constructor arguments: instead of `strictMode`,
935*57b5a4a6SAndroid Build Coastguard Workernow three different flags are available: `ignoreUnknownKeys`, `isLenient`, and `serializeSpecialFloatingPointValues`.
936*57b5a4a6SAndroid Build Coastguard Worker
937*57b5a4a6SAndroid Build Coastguard Worker3. If you used formats other than JSON, make sure you've included the corresponding artifact as dependency,
938*57b5a4a6SAndroid Build Coastguard Workerbecause now they're located outside of core module. See [formats list](formats/README.md) for particular artifact coordinates.
939*57b5a4a6SAndroid Build Coastguard Worker
940*57b5a4a6SAndroid Build Coastguard Worker4. Other corresponding deprecation replacements are available via standard `@Deprecated(replaceWith=..)` mechanism.
941*57b5a4a6SAndroid Build Coastguard Worker(use Alt+Enter for quickfix replacing).
942*57b5a4a6SAndroid Build Coastguard Worker
943*57b5a4a6SAndroid Build Coastguard Worker### Full changelog (by commit):
944*57b5a4a6SAndroid Build Coastguard Worker
945*57b5a4a6SAndroid Build Coastguard Worker  * This release is compatible with Kotlin 1.3.70
946*57b5a4a6SAndroid Build Coastguard Worker  * Rework polymorphic descriptors: polymorphic and sealed descriptor elements are now aligned with an actual serialization process (#731)
947*57b5a4a6SAndroid Build Coastguard Worker  * Hide internal collection and map serializers
948*57b5a4a6SAndroid Build Coastguard Worker  * Introduce factories for ArraySerializers as well, deprecate top-level array serializers
949*57b5a4a6SAndroid Build Coastguard Worker  * Extract ElementValue encoder and decoder to builtins and rename it to AbstractEncoder and AbstractDecoder respectively
950*57b5a4a6SAndroid Build Coastguard Worker  * Hide as much internal API as possible for collections. Now ListSerializer(), etc factories should be used
951*57b5a4a6SAndroid Build Coastguard Worker  * Replace top-level primitive serializers with corresponding companion functions from builtins
952*57b5a4a6SAndroid Build Coastguard Worker  * Move Tagged.kt to internal package
953*57b5a4a6SAndroid Build Coastguard Worker  * Hide tuple serializers from the public usages and replace them with factory methods in builtins package
954*57b5a4a6SAndroid Build Coastguard Worker  * Deprecate top-level format instances, leave only companion objects
955*57b5a4a6SAndroid Build Coastguard Worker  * Document contracts for JsonInput/JsonOutput (#715)
956*57b5a4a6SAndroid Build Coastguard Worker  * Ensure that serialization exception is thrown from JSON parser on invalid inputs (#704)
957*57b5a4a6SAndroid Build Coastguard Worker  * Do best-effort input/output attach to exceptions to simplify debugging
958*57b5a4a6SAndroid Build Coastguard Worker  * JSON configuration rework: strictMode is splitted into three flags.
959*57b5a4a6SAndroid Build Coastguard Worker  * Make strictMode even more restrictive, prohibit unquoted keys and values by default, always use strict boolean parser (#498, #467)
960*57b5a4a6SAndroid Build Coastguard Worker  * Preserve quotation information during JsonLiteral parsing (#536, #537)
961*57b5a4a6SAndroid Build Coastguard Worker  * Change MapEntrySerializer.descriptor to be truly map-like. Otherwise, it cannot be properly serialized by TaggedDecoder (-> to JsonObject)
962*57b5a4a6SAndroid Build Coastguard Worker  * Cleanup ConfigParser: move to proper package to be consistent with other formats
963*57b5a4a6SAndroid Build Coastguard Worker  * Support primitive and reference arrays in serializer(KType)
964*57b5a4a6SAndroid Build Coastguard Worker  * Add option to use HOCON naming convention
965*57b5a4a6SAndroid Build Coastguard Worker  * Allow DynamicObjectParser to handle polymorphic types (array-mode polymorphism only)
966*57b5a4a6SAndroid Build Coastguard Worker  * Get rid of PrimitiveKind.UNIT and corresponding encoder methods. Now UNIT encoded as regular object.
967*57b5a4a6SAndroid Build Coastguard Worker  * JsonParametricSerializer and JsonTransformingSerializer implementation
968*57b5a4a6SAndroid Build Coastguard Worker  * Remove AbstractSerialFormat superclass since it is useless
969*57b5a4a6SAndroid Build Coastguard Worker  * Deprecate most of the functions intended for internal use
970*57b5a4a6SAndroid Build Coastguard Worker  * Document core kotlinx.serialization.* package
971*57b5a4a6SAndroid Build Coastguard Worker  * Introduce UnionKind.CONTEXTUAL to cover Polymorphic/Contextual serializers, get rid of elementsCount in builders
972*57b5a4a6SAndroid Build Coastguard Worker  * SerialDescriptor for enums rework: now each enum member has object kind
973*57b5a4a6SAndroid Build Coastguard Worker  * Introduce DSL for creating user-defined serial descriptors
974*57b5a4a6SAndroid Build Coastguard Worker  * Update README with Gradle Kotlin DSL (#638)
975*57b5a4a6SAndroid Build Coastguard Worker  * Fix infinite recursion in EnumDescriptor.hashCode() (#666)
976*57b5a4a6SAndroid Build Coastguard Worker  * Allow duplicating serializers during SerialModule concatenation if they are equal (#616)
977*57b5a4a6SAndroid Build Coastguard Worker  * Rework sealed class discriminator check to reduce the footprint of the check when no JSON is used
978*57b5a4a6SAndroid Build Coastguard Worker  * Detect collisions with class discriminator and for equal serial names within the same sealed class hierarchy (#457)
979*57b5a4a6SAndroid Build Coastguard Worker  * Detect name conflicts in polymorphic serialization during setup phase (#461, #457, #589)
980*57b5a4a6SAndroid Build Coastguard Worker  * Extract all mutable state in modules package to SerialModuleBuilder to have a single mutable point and to ensure that SerialModule can never be modified
981*57b5a4a6SAndroid Build Coastguard Worker  * Omit nulls in Properties.store instead of throwing an exception
982*57b5a4a6SAndroid Build Coastguard Worker  * Add optionals handling to Properties reader (#460, #79)
983*57b5a4a6SAndroid Build Coastguard Worker  * Support StructureKind.MAP in Properties correctly (#406)
984*57b5a4a6SAndroid Build Coastguard Worker  * Move Mapper to separate 'properties' module and rename it to Properties
985*57b5a4a6SAndroid Build Coastguard Worker  * Reified extensions for registering serializers in SerialModule (#671, #669)
986*57b5a4a6SAndroid Build Coastguard Worker  * Promote KSerializer.nullable to public API
987*57b5a4a6SAndroid Build Coastguard Worker  * Object serializer support in KType and Type based serializer lookups on JVM (#656)
988*57b5a4a6SAndroid Build Coastguard Worker  * Deprecate HexConverter
989*57b5a4a6SAndroid Build Coastguard Worker  * Supply correct child descriptors for Pair and Triple
990*57b5a4a6SAndroid Build Coastguard Worker  * Rename SerialId to ProtoId to better reflect its semantics
991*57b5a4a6SAndroid Build Coastguard Worker  * Support of custom generic classes in typeOf()/serializer() API (except JS)
992*57b5a4a6SAndroid Build Coastguard Worker  * Allow setting `ProtoBuf.shouldEncodeElementDefault` to false (#397, #71)
993*57b5a4a6SAndroid Build Coastguard Worker  * Add Linux ARM 32 and 64 bit targets
994*57b5a4a6SAndroid Build Coastguard Worker  * Reduce number of internal dependencies: deprecate IOException, mark IS/OS as internal serialization API (so it can be removed in the future release)
995*57b5a4a6SAndroid Build Coastguard Worker  * Reduce number of internal dependencies and use bitwise operations in ProtoBuf/Cbor instead of ByteBuffer. Deprecate ByteBuffer for removal
996*57b5a4a6SAndroid Build Coastguard Worker  * Extract ProtoBuf & CBOR format to the separate module
997*57b5a4a6SAndroid Build Coastguard Worker  * READ_ALL rework (#600)
998*57b5a4a6SAndroid Build Coastguard Worker  * SerialDescriptor API standartization (#626, #361, #410)
999*57b5a4a6SAndroid Build Coastguard Worker  * Support polymorphism in CBOR correctly (fixes #620)
1000*57b5a4a6SAndroid Build Coastguard Worker  * Add forgotten during migration WASM32 target (#625)
1001*57b5a4a6SAndroid Build Coastguard Worker  * Fix exception messages & typos in JsonElement (#621)
1002*57b5a4a6SAndroid Build Coastguard Worker
1003*57b5a4a6SAndroid Build Coastguard Workerv0.14.0 / 2019-11-19
1004*57b5a4a6SAndroid Build Coastguard Worker==================
1005*57b5a4a6SAndroid Build Coastguard Worker
1006*57b5a4a6SAndroid Build Coastguard Worker  * Bump version to 0.14.0 @ Kotlin 1.3.60
1007*57b5a4a6SAndroid Build Coastguard Worker  * Add empty javadoc artifact to linking with Maven Central
1008*57b5a4a6SAndroid Build Coastguard Worker  * Mark more things as @InternalSerializationApi.
1009*57b5a4a6SAndroid Build Coastguard Worker  * Support @SerialId on enum members in protobuf encoding
1010*57b5a4a6SAndroid Build Coastguard Worker  * Move Polymorphic and sealed kinds from UnionKind to special PolymorphicKind
1011*57b5a4a6SAndroid Build Coastguard Worker  * Sealed classes serialization & generated serializers for enum classes (@SerialInfo support)
1012*57b5a4a6SAndroid Build Coastguard Worker  * Objects serialization
1013*57b5a4a6SAndroid Build Coastguard Worker  * Don't use deprecated UTF8<>ByteArray conversions in Native
1014*57b5a4a6SAndroid Build Coastguard Worker  * Improve error message when static non-generic serializer can't be found
1015*57b5a4a6SAndroid Build Coastguard Worker  * Support optional values for typesafe config format
1016*57b5a4a6SAndroid Build Coastguard Worker
1017*57b5a4a6SAndroid Build Coastguard Workerv0.13.0 / 2019-09-12
1018*57b5a4a6SAndroid Build Coastguard Worker==================
1019*57b5a4a6SAndroid Build Coastguard Worker
1020*57b5a4a6SAndroid Build Coastguard Worker  * Add mingwX86 target (#556)
1021*57b5a4a6SAndroid Build Coastguard Worker  * Replace KClass.simpleName with artificial expect/actual with java.lang.Class.simpleName on JVM to overcome requirement for kotlin-reflect.jar (#549)
1022*57b5a4a6SAndroid Build Coastguard Worker  * Update Gradle to 5.6.1 (therefore Gradle metadata to 1.0)
1023*57b5a4a6SAndroid Build Coastguard Worker  * Fix incorrect index supply during map deserialization when READ_ALL was used (#526)
1024*57b5a4a6SAndroid Build Coastguard Worker  * Serializers for primitive arrays (ByteArray etc)
1025*57b5a4a6SAndroid Build Coastguard Worker  * Hide NullableSerializer, introduce '.nullable' extension instead
1026*57b5a4a6SAndroid Build Coastguard Worker  * Fix the library to not create a stack overflow exception when creating a MissingDescriptorException. (#545)
1027*57b5a4a6SAndroid Build Coastguard Worker
1028*57b5a4a6SAndroid Build Coastguard Workerv0.12.0 / 2019-08-23
1029*57b5a4a6SAndroid Build Coastguard Worker==================
1030*57b5a4a6SAndroid Build Coastguard Worker
1031*57b5a4a6SAndroid Build Coastguard Worker  * Set up linuxArm32Hfp target (#535)
1032*57b5a4a6SAndroid Build Coastguard Worker  * wasm32 is added as a build target (#518)
1033*57b5a4a6SAndroid Build Coastguard Worker  * MPP (JVM & Native) serializer resolving from KType (via typeOf()/serializer() function)
1034*57b5a4a6SAndroid Build Coastguard Worker  * Support maps and objects decoding when map size present in stream (fix #517)
1035*57b5a4a6SAndroid Build Coastguard Worker  * Add proper SerialClassDescImpl.toString
1036*57b5a4a6SAndroid Build Coastguard Worker  * Make JSON parser much more stricter; e.g. Prohibit all excessive separators in objects and maps
1037*57b5a4a6SAndroid Build Coastguard Worker  * Robust JsonArray parsing
1038*57b5a4a6SAndroid Build Coastguard Worker  * Improve json exceptions, add more contextual information, get rid of obsolete exception types
1039*57b5a4a6SAndroid Build Coastguard Worker  * Prohibit trailing commas in JSON parser
1040*57b5a4a6SAndroid Build Coastguard Worker  * Make the baseclass of the polymorphic serializer public to allow formats (#520)
1041*57b5a4a6SAndroid Build Coastguard Worker  * Fix decoding for ProtoBuf when there are missing properties in the model. (#506)
1042*57b5a4a6SAndroid Build Coastguard Worker  * Rework JsonException and related subclasses
1043*57b5a4a6SAndroid Build Coastguard Worker  * Fix #480 (deserialization of complex map keys). Add tests for structured map keys in conjuction with polymorphism
1044*57b5a4a6SAndroid Build Coastguard Worker  * Implement 'allowStructuredMapKeys' flag. Now this flag is required for serializing into JSON maps which keys are not primitive.
1045*57b5a4a6SAndroid Build Coastguard Worker
1046*57b5a4a6SAndroid Build Coastguard Workerv0.11.1 / 2019-06-19
1047*57b5a4a6SAndroid Build Coastguard Worker==================
1048*57b5a4a6SAndroid Build Coastguard Worker
1049*57b5a4a6SAndroid Build Coastguard Worker  * Fixed some bugs in compiler plugin for Native (#472, #478) (Kotlin 1.3.40 required)
1050*57b5a4a6SAndroid Build Coastguard Worker  * Remove dependency on stdlib-jvm from common source set (Fixes #481)
1051*57b5a4a6SAndroid Build Coastguard Worker  * Fix @UseSerializers argument type and clarify some docs
1052*57b5a4a6SAndroid Build Coastguard Worker  * Support primitives (ints, strings, JsonLiterals, JsonNull, etc) on a top-level when saving/restoring JSON AST (#451)
1053*57b5a4a6SAndroid Build Coastguard Worker  * Migrate to the new (Kotlin 1.3) MPP model
1054*57b5a4a6SAndroid Build Coastguard Worker  * Add @SharedImmutable to default json module. Fixes #441 and #446
1055*57b5a4a6SAndroid Build Coastguard Worker
1056*57b5a4a6SAndroid Build Coastguard Workerv0.11.0 / 2019-04-12
1057*57b5a4a6SAndroid Build Coastguard Worker====================
1058*57b5a4a6SAndroid Build Coastguard Worker
1059*57b5a4a6SAndroid Build Coastguard Worker#### Plugin:
1060*57b5a4a6SAndroid Build Coastguard Worker
1061*57b5a4a6SAndroid Build Coastguard Worker  * **Semantic change**: Now properties with default values are @Optional by default, and properties without backing fields are @Transient by default.
1062*57b5a4a6SAndroid Build Coastguard Worker  * Allow '@Serializable' on a type usage (fixes #367)
1063*57b5a4a6SAndroid Build Coastguard Worker  * Auto-applying @Polymorphic for interfaces and serializable abstract classes
1064*57b5a4a6SAndroid Build Coastguard Worker  * Do not enable PolymorphicSerializer without special annotation
1065*57b5a4a6SAndroid Build Coastguard Worker  * Fix missing optionality of property when generating descriptor in Native
1066*57b5a4a6SAndroid Build Coastguard Worker  * Fix impossibility to make @Optional field in a class hierarchy on JS
1067*57b5a4a6SAndroid Build Coastguard Worker  * Add synthetic companion with .serializer() getter even if default serializer is overridden. (fixes #228)
1068*57b5a4a6SAndroid Build Coastguard Worker  * Ban primitive arrays in JVM codegen too (fixes #260)
1069*57b5a4a6SAndroid Build Coastguard Worker  * Don't generate writeSelf/internal constructor if corresponding serialize/deserialize aren't auto-generated
1070*57b5a4a6SAndroid Build Coastguard Worker  * Support Serializable class hierarchies on Native and JS
1071*57b5a4a6SAndroid Build Coastguard Worker  * Replace @Optional with @Required
1072*57b5a4a6SAndroid Build Coastguard Worker  * Support classes with more than 32 serializable properties (fixes #164)
1073*57b5a4a6SAndroid Build Coastguard Worker  * Make enums and interfaces not serializable internally. However, they still can be serialized using custom companion object. Fixes #138 and #304
1074*57b5a4a6SAndroid Build Coastguard Worker
1075*57b5a4a6SAndroid Build Coastguard Worker#### Runtime:
1076*57b5a4a6SAndroid Build Coastguard Worker  * Introduce JsonBuilder and JsonConfiguration as a better mechanism for configuring and changing configuration of the JSON
1077*57b5a4a6SAndroid Build Coastguard Worker  * Implement polymorphic serialization in JSON using class discriminator key
1078*57b5a4a6SAndroid Build Coastguard Worker  * Force quoting for map keys (fixes #379)
1079*57b5a4a6SAndroid Build Coastguard Worker  * Fix bug with endianness in Native for Longs/Doubles
1080*57b5a4a6SAndroid Build Coastguard Worker  * Do not allow to mutate SerialModule in formats
1081*57b5a4a6SAndroid Build Coastguard Worker  * Implement multiplatform (JVM, JS and Native) PolymorphicSerializer
1082*57b5a4a6SAndroid Build Coastguard Worker  * Remove obsolete and poorly designed global class cache. Remove JVM-only PolymorphicSerializer
1083*57b5a4a6SAndroid Build Coastguard Worker  * Replace old SerialModule with new one which: - Can not be installed, should be passed in format constructor - Has polymorphic resolve and contextual resolve - Has DSL for creation - Immutable, but can be combined or overwritten
1084*57b5a4a6SAndroid Build Coastguard Worker  * Improve error message for unknown enum constant
1085*57b5a4a6SAndroid Build Coastguard Worker  * Deprecate @Optional, introduce @Required
1086*57b5a4a6SAndroid Build Coastguard Worker  * Use long instead of int in JsonLiteralSerializer
1087*57b5a4a6SAndroid Build Coastguard Worker  * Json and protobuf schemas recording prototype
1088*57b5a4a6SAndroid Build Coastguard Worker  * Change JsonObject so it would comply to a Map interface: .get should return null for a missing key Incompatibility with standard Map contract may bring a lot of problems, e.g. broken equals.
1089*57b5a4a6SAndroid Build Coastguard Worker  * Make JsonElementSerializer public
1090*57b5a4a6SAndroid Build Coastguard Worker
1091*57b5a4a6SAndroid Build Coastguard Worker0.10.0 / 2019-01-22
1092*57b5a4a6SAndroid Build Coastguard Worker==================
1093*57b5a4a6SAndroid Build Coastguard Worker
1094*57b5a4a6SAndroid Build Coastguard Worker  * Migrate to Gradle 4.10 and metadata 0.4
1095*57b5a4a6SAndroid Build Coastguard Worker  * Update to 1.3.20
1096*57b5a4a6SAndroid Build Coastguard Worker  * Reorder Json parameter for consistency
1097*57b5a4a6SAndroid Build Coastguard Worker  * Make JsonElement.toString() consistent with stringify (#325)
1098*57b5a4a6SAndroid Build Coastguard Worker  * Reader.read(): Int should return -1 on EOF.
1099*57b5a4a6SAndroid Build Coastguard Worker  * Optimize the Writer.write(String) case.
1100*57b5a4a6SAndroid Build Coastguard Worker  * Update the docs with new annotations
1101*57b5a4a6SAndroid Build Coastguard Worker
1102*57b5a4a6SAndroid Build Coastguard Worker0.10.0-eap-1 / 2018-12-19
1103*57b5a4a6SAndroid Build Coastguard Worker==================
1104*57b5a4a6SAndroid Build Coastguard Worker
1105*57b5a4a6SAndroid Build Coastguard Worker#### Plugin:
1106*57b5a4a6SAndroid Build Coastguard Worker
1107*57b5a4a6SAndroid Build Coastguard Worker  * Support @SerialInfo annotation for Native
1108*57b5a4a6SAndroid Build Coastguard Worker  * Remove redundant check for 'all parameters are properties' in a case of fully-customized serializer.
1109*57b5a4a6SAndroid Build Coastguard Worker  * Fix unresolved symbol to SerialDescriptor in KSerializer if it was referenced from user custom serializer code (#290)
1110*57b5a4a6SAndroid Build Coastguard Worker  * Support for @UseSerializers annotation
1111*57b5a4a6SAndroid Build Coastguard Worker  * Restrict auto-implementing serializers methods to certain type of classes
1112*57b5a4a6SAndroid Build Coastguard Worker  * Increase priority of overridden serializer on type (#252)
1113*57b5a4a6SAndroid Build Coastguard Worker  * Fix instantiation of generic serializers on JS (#244)
1114*57b5a4a6SAndroid Build Coastguard Worker  * .shouldEncodeElementDefault for JVM (#58)
1115*57b5a4a6SAndroid Build Coastguard Worker  * Support skipping values equals to defaults in output stream for JS and Native backends (#58)
1116*57b5a4a6SAndroid Build Coastguard Worker  * Support enums in Native
1117*57b5a4a6SAndroid Build Coastguard Worker  * Support reference array and context serializers in Native
1118*57b5a4a6SAndroid Build Coastguard Worker  * Fix order of overriding @Serializable(with) on property: check override, than @ContextualSerialization.
1119*57b5a4a6SAndroid Build Coastguard Worker  * Support @Transient properties initializers and init blocks in Native
1120*57b5a4a6SAndroid Build Coastguard Worker  * Better lookup for `serializer()` function in companion for generic classes because user can define a parameterless shorthand one (#228)
1121*57b5a4a6SAndroid Build Coastguard Worker  * Generics serialization in Native
1122*57b5a4a6SAndroid Build Coastguard Worker  * .getElementDescriptor for JVM, JS and Native
1123*57b5a4a6SAndroid Build Coastguard Worker  * Respect @ContextualSerialization on file
1124*57b5a4a6SAndroid Build Coastguard Worker  * Remove auto-applying ContextSerializer. @ContextualSerialization should be used instead.
1125*57b5a4a6SAndroid Build Coastguard Worker
1126*57b5a4a6SAndroid Build Coastguard Worker#### Runtime:
1127*57b5a4a6SAndroid Build Coastguard Worker
1128*57b5a4a6SAndroid Build Coastguard Worker  * Turn around messed endianness names (#308)
1129*57b5a4a6SAndroid Build Coastguard Worker  * Update to Kotlin 1.3.20 EAP 2
1130*57b5a4a6SAndroid Build Coastguard Worker  * Get rid of protobuf-platform functions since @SerialInfo annotations are supported now. Auto-assign ids starting with 1 because 0 is not a valid protobuf ID.
1131*57b5a4a6SAndroid Build Coastguard Worker  * Delegates `equals`, `hashCode` of `JsonObject` and `JsonArray`.
1132*57b5a4a6SAndroid Build Coastguard Worker  * Test for fixed #190 in plugin
1133*57b5a4a6SAndroid Build Coastguard Worker  * UseSerializers annotation
1134*57b5a4a6SAndroid Build Coastguard Worker  * Introduce LongAsStringSerializer
1135*57b5a4a6SAndroid Build Coastguard Worker  * Add validation for parsing dynamic to Long Fixes #274
1136*57b5a4a6SAndroid Build Coastguard Worker  * Merge pull request #294 from Kotlin/recursive_custom_parsing
1137*57b5a4a6SAndroid Build Coastguard Worker  * Fix recursive serialization for JsonOutputs/Inputs
1138*57b5a4a6SAndroid Build Coastguard Worker  * Production-ready JSON API
1139*57b5a4a6SAndroid Build Coastguard Worker  * Remove ValueTransformer
1140*57b5a4a6SAndroid Build Coastguard Worker  * Json improvements
1141*57b5a4a6SAndroid Build Coastguard Worker  * @Serializable support for JsonArray
1142*57b5a4a6SAndroid Build Coastguard Worker  * @Serializable support for JsonObject
1143*57b5a4a6SAndroid Build Coastguard Worker  * @Serializable support for JsonNull and JsonPrimitive
1144*57b5a4a6SAndroid Build Coastguard Worker  * Hide JsonTreeParser, provide Json.parseJson as replacement, implement basic JsonElementSerializer.deserialize
1145*57b5a4a6SAndroid Build Coastguard Worker  * Migrate the rest of the test on JsonTestBase, implement nullable result in tree json
1146*57b5a4a6SAndroid Build Coastguard Worker  * Implement custom serializers support for TreeJsonInput
1147*57b5a4a6SAndroid Build Coastguard Worker  * Implement JsonArray serialization
1148*57b5a4a6SAndroid Build Coastguard Worker  * Implement strict mode for double in TreeJsonOutput (fixes JsonModesTest)
1149*57b5a4a6SAndroid Build Coastguard Worker  * Introduce JsonTestBase in order to ensure streaming and tree json compatibility, transient and strict support in TreeJsonInput
1150*57b5a4a6SAndroid Build Coastguard Worker  * Make JsonElement serializable via common machinery
1151*57b5a4a6SAndroid Build Coastguard Worker  * Json rework, consolidate different parsing mechanisms, hide implementation details
1152*57b5a4a6SAndroid Build Coastguard Worker  * Polymorphic serializer improvements
1153*57b5a4a6SAndroid Build Coastguard Worker  * Renamed identifiers to align with Kotlin's coding conventions. https://kotlinlang.org/docs/reference/coding-conventions.html#naming-rules
1154*57b5a4a6SAndroid Build Coastguard Worker  * Changed JSON -> Json and CBOR -> Cbor
1155*57b5a4a6SAndroid Build Coastguard Worker
1156*57b5a4a6SAndroid Build Coastguard Workerv0.9.1 / 2018-11-19
1157*57b5a4a6SAndroid Build Coastguard Worker==================
1158*57b5a4a6SAndroid Build Coastguard Worker
1159*57b5a4a6SAndroid Build Coastguard Worker  * Update lib to 0.9.1/Kotlin to 1.3.10
1160*57b5a4a6SAndroid Build Coastguard Worker  * Make some clarifications about Gradle plugin DSL and serialization plugin distribution
1161*57b5a4a6SAndroid Build Coastguard Worker  * Primitive descriptor with overriden name
1162*57b5a4a6SAndroid Build Coastguard Worker  * Add missing shorthands for float and char serializers (Fixes #263)
1163*57b5a4a6SAndroid Build Coastguard Worker  * Fix bug where primitive non-string values created by hand and created by parser could be inequal due to a redundant type comparison.
1164*57b5a4a6SAndroid Build Coastguard Worker  * Don't look at default serializer too early during reflective lookup (Fixes #250)
1165*57b5a4a6SAndroid Build Coastguard Worker
1166*57b5a4a6SAndroid Build Coastguard Workerv0.9.0 / 2018-10-24
1167*57b5a4a6SAndroid Build Coastguard Worker==================
1168*57b5a4a6SAndroid Build Coastguard Worker
1169*57b5a4a6SAndroid Build Coastguard Worker  * Fix bug where `.simpleName` was not available for primitives' KClasses.
1170*57b5a4a6SAndroid Build Coastguard Worker  * Improve Mapper: it is now a class (with default instance in Companion) which extends AbstractSerialFormat and therefore have context and proper reflectionless API.
1171*57b5a4a6SAndroid Build Coastguard Worker  * Introduce @ImplicitReflectionSerializer for API which involves reflection.
1172*57b5a4a6SAndroid Build Coastguard Worker  * Add Boolean.Companion.serializer() extension method.
1173*57b5a4a6SAndroid Build Coastguard Worker  * Refactor surface API: introduce interfaces for different formats, move some inline functions for serialization start to extensions. As a minor change, now nulls can be serialized at top-level, where it is supported by the format.
1174*57b5a4a6SAndroid Build Coastguard Worker  * Add AbstractSerialFormat as a base class to all major formats
1175*57b5a4a6SAndroid Build Coastguard Worker  * Update general readme and versions: Library to 0.9, K/N to 1.0 beta
1176*57b5a4a6SAndroid Build Coastguard Worker  * Update documentation for the new API
1177*57b5a4a6SAndroid Build Coastguard Worker  * Updated info about eap13 releases
1178*57b5a4a6SAndroid Build Coastguard Worker
1179*57b5a4a6SAndroid Build Coastguard Workerv0.8.3-rc13 / 2018-10-19
1180*57b5a4a6SAndroid Build Coastguard Worker==================
1181*57b5a4a6SAndroid Build Coastguard Worker
1182*57b5a4a6SAndroid Build Coastguard Worker  * Set default byte order to BigEndian (to be more platform-independent and get rid of posix.BYTE_ORDER dependency)
1183*57b5a4a6SAndroid Build Coastguard Worker  * Update Kotlin version to 1.3-RC4
1184*57b5a4a6SAndroid Build Coastguard Worker  * Remove Gradle metadata from non-native modules
1185*57b5a4a6SAndroid Build Coastguard Worker  * Add missing targets (Fixes #232)
1186*57b5a4a6SAndroid Build Coastguard Worker  * Add license, developer and scm information in Maven pom in publication (Fixes #239)
1187*57b5a4a6SAndroid Build Coastguard Worker  * Add builder for JsonArray
1188*57b5a4a6SAndroid Build Coastguard Worker  * Redesign and unify exceptions from parsers (Fixes #238)
1189*57b5a4a6SAndroid Build Coastguard Worker  * Move json parser back to monolith module (drops `jsonparser` artifact)
1190*57b5a4a6SAndroid Build Coastguard Worker  * Little improvement of error messages
1191*57b5a4a6SAndroid Build Coastguard Worker  > Not working until plugin is updated:
1192*57b5a4a6SAndroid Build Coastguard Worker  * Initial support for skipping defaults: JSON
1193*57b5a4a6SAndroid Build Coastguard Worker  * Replace choicesNames to Array to be easily instantiated from generated IR
1194*57b5a4a6SAndroid Build Coastguard Worker
1195*57b5a4a6SAndroid Build Coastguard Workerv0.8.2-rc13 / 2018-10-03
1196*57b5a4a6SAndroid Build Coastguard Worker========================
1197*57b5a4a6SAndroid Build Coastguard Worker
1198*57b5a4a6SAndroid Build Coastguard Worker  * Update to RC-3
1199*57b5a4a6SAndroid Build Coastguard Worker  * Add @SharedImmutable from K/N to some global declarations in JSON parser, so it is now accessible from multiple workers (Fixes #225)
1200*57b5a4a6SAndroid Build Coastguard Worker  > Not working until plugin is updated:
1201*57b5a4a6SAndroid Build Coastguard Worker  * Tests for generic descriptors
1202*57b5a4a6SAndroid Build Coastguard Worker  * Generated serializer and stuff for providing descriptors from plugin
1203*57b5a4a6SAndroid Build Coastguard Worker  * Tests on @ContextualSerialization on file
1204*57b5a4a6SAndroid Build Coastguard Worker
1205*57b5a4a6SAndroid Build Coastguard Workerv0.8.1-rc13 / 2018-09-24
1206*57b5a4a6SAndroid Build Coastguard Worker========================
1207*57b5a4a6SAndroid Build Coastguard Worker
1208*57b5a4a6SAndroid Build Coastguard Worker  * Upgrade Kotlin/Native version
1209*57b5a4a6SAndroid Build Coastguard Worker
1210*57b5a4a6SAndroid Build Coastguard Workerv0.8.0-rc13 / 2018-09-19
1211*57b5a4a6SAndroid Build Coastguard Worker========================
1212*57b5a4a6SAndroid Build Coastguard Worker
1213*57b5a4a6SAndroid Build Coastguard Worker  * Add (currently) no-op annotations to the kibrary for smoother migration
1214*57b5a4a6SAndroid Build Coastguard Worker  * Update migration guide and versions to RCs.
1215*57b5a4a6SAndroid Build Coastguard Worker  * Support WildcardType in serializerByTypeToken (#212)
1216*57b5a4a6SAndroid Build Coastguard Worker  > Not working until plugin is updated:
1217*57b5a4a6SAndroid Build Coastguard Worker  * Added experimental support of reference arrays for Native
1218*57b5a4a6SAndroid Build Coastguard Worker
1219*57b5a4a6SAndroid Build Coastguard Workerv0.7.3-eap-13 / 2018-09-18
1220*57b5a4a6SAndroid Build Coastguard Worker==========================
1221*57b5a4a6SAndroid Build Coastguard Worker
1222*57b5a4a6SAndroid Build Coastguard Worker  * New enum serializing model
1223*57b5a4a6SAndroid Build Coastguard Worker  * New context: SerialModules draft. Renaming and mutable/immutable hierarchy
1224*57b5a4a6SAndroid Build Coastguard Worker  * Remove untyped encoding
1225*57b5a4a6SAndroid Build Coastguard Worker  * Improve serializers resolving by adding primitive serializers. Also add some helper methods to JSON to serialize lists without pain
1226*57b5a4a6SAndroid Build Coastguard Worker  * Fix protobuf by adapting MapLikeSerializer to HashSetSerializer(MapEntrySerializer). Elements' serializers in collection serializers are now accessible for such adaptions.
1227*57b5a4a6SAndroid Build Coastguard Worker  * Prohibit NaN and infinite values in JSON strict mode
1228*57b5a4a6SAndroid Build Coastguard Worker  * Cleanup JSON, reflect opt-in strict mode in naming
1229*57b5a4a6SAndroid Build Coastguard Worker  * Get rid of StructureKind.SET and StructureKind.ENTRY
1230*57b5a4a6SAndroid Build Coastguard Worker  * Remove SIZE_INDEX
1231*57b5a4a6SAndroid Build Coastguard Worker  * Remove inheritance from Encoder and CompositeEncoder
1232*57b5a4a6SAndroid Build Coastguard Worker  * Working over primitive kinds and enums
1233*57b5a4a6SAndroid Build Coastguard Worker  * Reworked SerialDescriptor and kinds
1234*57b5a4a6SAndroid Build Coastguard Worker  * Renaming of ElementValue* and Tagged*
1235*57b5a4a6SAndroid Build Coastguard Worker  * Renaming: KOutput -> Encoder/CompositeEncoder KInput -> Decoder/CompositeDecoder
1236*57b5a4a6SAndroid Build Coastguard Worker  * Renaming: KSerialClassDesc -> SerialDescriptor SerialSaver, SerialLoader -> *Strategy
1237*57b5a4a6SAndroid Build Coastguard Worker  > Not working until plugin is updated:
1238*57b5a4a6SAndroid Build Coastguard Worker  * Provide limited `equals` on collections' descriptors
1239*57b5a4a6SAndroid Build Coastguard Worker  * Support for `isElementOptional`
1240*57b5a4a6SAndroid Build Coastguard Worker
1241*57b5a4a6SAndroid Build Coastguard Workerv0.6.2 / 2018-09-12
1242*57b5a4a6SAndroid Build Coastguard Worker===================
1243*57b5a4a6SAndroid Build Coastguard Worker
1244*57b5a4a6SAndroid Build Coastguard Worker  * Updated Kotlin to 1.2.70 and Kotlin/Native to 0.9
1245*57b5a4a6SAndroid Build Coastguard Worker
1246*57b5a4a6SAndroid Build Coastguard Workerv0.6.1 / 2018-08-06
1247*57b5a4a6SAndroid Build Coastguard Worker===================
1248*57b5a4a6SAndroid Build Coastguard Worker
1249*57b5a4a6SAndroid Build Coastguard Worker  * Compatibility release for 1.2.60
1250*57b5a4a6SAndroid Build Coastguard Worker  * Don't throw NoSuchElement if key is missing in the map in `Mapper.readNotNullMark`,
1251*57b5a4a6SAndroid Build Coastguard Worker  because tag can be only prefix for nested object. Fixes #182
1252*57b5a4a6SAndroid Build Coastguard Worker  * Update ios sample with latest http client
1253*57b5a4a6SAndroid Build Coastguard Worker
1254*57b5a4a6SAndroid Build Coastguard Workerv0.6.0 / 2018-07-13
1255*57b5a4a6SAndroid Build Coastguard Worker===================
1256*57b5a4a6SAndroid Build Coastguard Worker
1257*57b5a4a6SAndroid Build Coastguard Worker  Plugin:
1258*57b5a4a6SAndroid Build Coastguard Worker
1259*57b5a4a6SAndroid Build Coastguard Worker  * Allow @SerialName and @SerialInfo on classes
1260*57b5a4a6SAndroid Build Coastguard Worker  * Fix resolving serializers for classes from other modules (#153 and #166)
1261*57b5a4a6SAndroid Build Coastguard Worker
1262*57b5a4a6SAndroid Build Coastguard Worker  Runtime:
1263*57b5a4a6SAndroid Build Coastguard Worker
1264*57b5a4a6SAndroid Build Coastguard Worker  * Use new 0.8 K/N DSL
1265*57b5a4a6SAndroid Build Coastguard Worker  * Simplify JSON AST API, Provide JSON builder, provide useful extensions, add documentation, update K/N
1266*57b5a4a6SAndroid Build Coastguard Worker  * Get rid of JsonString to align json primitives with each other. Provide JSON AST pojo parser which exposes current design issues
1267*57b5a4a6SAndroid Build Coastguard Worker  * [JSON-AST] Introduce non-nullable methods throwing exceptions for getting json elements
1268*57b5a4a6SAndroid Build Coastguard Worker  * [JSON-AST] Add ability to parse JSONInput element as tree. Symmetric functionality for JsonOutput + JsonTree
1269*57b5a4a6SAndroid Build Coastguard Worker  * [JSON-AST] Docs writeup
1270*57b5a4a6SAndroid Build Coastguard Worker  * [JSON-AST] Publishing native artifact on bintray
1271*57b5a4a6SAndroid Build Coastguard Worker  * [JSON-AST] Saving AST back to JSON
1272*57b5a4a6SAndroid Build Coastguard Worker  * [JSON-AST] JsonAstMapper to serializable classes
1273*57b5a4a6SAndroid Build Coastguard Worker  * Remove annoying "for class class" message in not found serializer exception
1274*57b5a4a6SAndroid Build Coastguard Worker  * Introduce module for benchmarks
1275*57b5a4a6SAndroid Build Coastguard Worker  * Add notes about snapshot versions
1276*57b5a4a6SAndroid Build Coastguard Worker  * Tests for bugs fixed in latest published plugin (#118 and #125)
1277*57b5a4a6SAndroid Build Coastguard Worker  * Auto-assign proto ids using field index
1278*57b5a4a6SAndroid Build Coastguard Worker
1279*57b5a4a6SAndroid Build Coastguard Workerv0.5.1 / 2018-06-13
1280*57b5a4a6SAndroid Build Coastguard Worker===================
1281*57b5a4a6SAndroid Build Coastguard Worker
1282*57b5a4a6SAndroid Build Coastguard Worker  Plugin:
1283*57b5a4a6SAndroid Build Coastguard Worker
1284*57b5a4a6SAndroid Build Coastguard Worker  * Fix 1.2.50 compatibility
1285*57b5a4a6SAndroid Build Coastguard Worker  * Workaround for recursive resolve on @Serializable(with) and @Serializer(for) pair annotations
1286*57b5a4a6SAndroid Build Coastguard Worker  * Don't generate additional constructor if @SerialInfo has no properties
1287*57b5a4a6SAndroid Build Coastguard Worker  * Fix order of resolving serializers: user-overriden should go before polymorphic and default
1288*57b5a4a6SAndroid Build Coastguard Worker  * While creating descriptors, add type arguments not from serializable class definition but from actual KSerializer implementation. This provides better support for user-defined or external generic serializers
1289*57b5a4a6SAndroid Build Coastguard Worker  * Don't generate constructor for passing generic serializers if user already defined proper one.
1290*57b5a4a6SAndroid Build Coastguard Worker  * Respect `@Serializable(with)` on properties on JS too.
1291*57b5a4a6SAndroid Build Coastguard Worker  * Fix for Kotlin/kotlinx.serialization/136
1292*57b5a4a6SAndroid Build Coastguard Worker  * Fix for Kotlin/kotlinx.serialization/125
1293*57b5a4a6SAndroid Build Coastguard Worker  * Fix for Kotlin/kotlinx.serialization/118
1294*57b5a4a6SAndroid Build Coastguard Worker  * Fix for Kotlin/kotlinx.serialization/123: resolve annotation parameters in-place
1295*57b5a4a6SAndroid Build Coastguard Worker
1296*57b5a4a6SAndroid Build Coastguard Worker  Runtime:
1297*57b5a4a6SAndroid Build Coastguard Worker
1298*57b5a4a6SAndroid Build Coastguard Worker  * Added some shorthands for standard serializers
1299*57b5a4a6SAndroid Build Coastguard Worker  * Fix for bug #141 that uses an extra boolean to determine whether to write a separating comma rather than assuming that the element with the index 0 is written first(or at all) in all cases.
1300*57b5a4a6SAndroid Build Coastguard Worker  * Move mode cache to output class to make .stringify stateless and thread-safe (#139)
1301*57b5a4a6SAndroid Build Coastguard Worker  * Bugfix #95: Can't locate default serializer for classes with named co… (#130)
1302*57b5a4a6SAndroid Build Coastguard Worker  * Updated versions in docs and examples Add changelog
1303*57b5a4a6SAndroid Build Coastguard Worker
1304*57b5a4a6SAndroid Build Coastguard Workerv0.5.0 / 2018-04-26
1305*57b5a4a6SAndroid Build Coastguard Worker===================
1306*57b5a4a6SAndroid Build Coastguard Worker
1307*57b5a4a6SAndroid Build Coastguard Worker  * Improve buildscript and bumped kotlin version to 1.2.40
1308*57b5a4a6SAndroid Build Coastguard Worker  * Remove code warnings
1309*57b5a4a6SAndroid Build Coastguard Worker  * Add note about different IDEA plugin versions
1310*57b5a4a6SAndroid Build Coastguard Worker  * Add null check to Companion when looking up serializer.
1311*57b5a4a6SAndroid Build Coastguard Worker  * Improved performance of JSON.stringify
1312*57b5a4a6SAndroid Build Coastguard Worker  * Improved performance of JSON.parse
1313*57b5a4a6SAndroid Build Coastguard Worker  * Added compatibility note
1314*57b5a4a6SAndroid Build Coastguard Worker  * Fix #107 and #112. #76 awaits next compiler release.
1315*57b5a4a6SAndroid Build Coastguard Worker
1316*57b5a4a6SAndroid Build Coastguard Workerv0.4.2 / 2018-03-07
1317*57b5a4a6SAndroid Build Coastguard Worker===================
1318*57b5a4a6SAndroid Build Coastguard Worker
1319*57b5a4a6SAndroid Build Coastguard Worker  * Update runtime library version to match plugin version. Update examples to use latest version of compiler, plugin and runtime. Update Gradle to run on build agents with Java 9.
1320*57b5a4a6SAndroid Build Coastguard Worker  * Fix ProGuard rules docs for serialization of classes with generic types
1321*57b5a4a6SAndroid Build Coastguard Worker  * Fix ProGuard rules docs for serialization 0.4.1 version
1322*57b5a4a6SAndroid Build Coastguard Worker  * Add support for @Serializable classes that are private and live out of kotlinx.serialization package. In such case the Companion field is not visible and must be set accessible before use.
1323*57b5a4a6SAndroid Build Coastguard Worker  * update jvm-example to latest versions
1324