Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.7.3 to 1…
….8.0 (#68) Bumps [org.jetbrains.kotlinx:kotlinx-serialization-json](https://github.com/Kotlin/kotlinx.serialization) from 1.7.3 to 1.8.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Kotlin/kotlinx.serialization/releases">org.jetbrains.kotlinx:kotlinx-serialization-json's releases</a>.</em></p> <blockquote> <h2>1.8.0</h2> <p>This release contains all of the changes from 1.8.0-RC. Kotlin 2.1.0 is used as a default, while upcoming 2.1.10 is also supported. Also added small bugfixes, including speedup of <code>ProtoWireType.from</code> (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2879">#2879</a>).</p> <h3>Changelog for 1.8.0-RC is presented below:</h3> <h2><code>@JsonIgnoreUnknownKeys</code> annotation</h2> <p>Previously, only global setting <code>JsonBuilder.ignoreUnknownKeys</code> controlled whether Json parser would throw exception if input contained a property that was not declared in a <code>@serializable</code> class. There were <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/1420">a lot of complaints</a> that this setting is not flexible enough. To address them, we added new <code>@JsonIgnoreUnknownKeys</code> annotation that can be applied on a per-class basis. With this annotation, it is possible to allow unknown properties for annotated classes, while general decoding methods (such as <code>Json.decodeFromString</code> and others) would still reject them for everything else. See details in the corresponding <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/pull/2874">PR</a>.</p> <h2>Stabilization of <code>SerialDescriptor</code> API and <code>@SealedSerializationApi</code> annotation</h2> <p><code>SerialDescriptor</code>, <code>SerialKind</code>, and related API has been around for a long time and has proven itself useful. The main reason <code>@ExperimentalSerializationApi</code> was on SerialDescriptor's properties is that we wanted to discourage people from subclassing it. Fortunately, Kotlin 2.1 provides a special mechanism for such a case — <a href="https://kotlinlang.org/docs/opt-in-requirements.html#opt-in-to-inherit-from-a-class-or-interface">SubclassOptInRequired</a>. New <code>kotlinx.serialization.SealedSerializationApi</code> annotation designates APIs as public for use, but closed for implementation — the case for SerialDescriptor, which is a non-sealed interface for technical reasons. Now you can use most of <code>SerialDescriptor</code> and its builders API without the need to opt-in into experimental serialization API. See the <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/pull/2827">PR</a> for more details.</p> <p><em>Note</em>: All <code>SerialKind</code>s are stable API now, except <code>PolymorphicKind</code> — we may want to expand it in the future.</p> <h2>Generate Java 8's default method implementations in interfaces</h2> <p><strong>TL;DR This change ensures better binary compatibility in the future for library. You should not experience any difference from it.</strong></p> <p>kotlinx.serialization library contains a lot of interfaces with default method implementations. Historically, Kotlin compiled a synthetic <code>DefaultImpls</code> class for them. <a href="https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces/">Starting from Kotlin 1.4</a>, it was possible to compile them using as Java 8's <code>default</code> methods to ensure that new methods can still be added to interfaces without the need for implementors to recompile. To preserve binary compatibility with existing clients, a special <code>all-compatbility</code> mode is supported in compiler to generate both <code>default</code> methods and synthetic <code>DefaultImpls</code> class.</p> <p>Now, kotlinx.serialization finally makes use of this <code>all-compatibility</code> mode, which potentially allows us to add new methods to interfaces such as <code>SerialDescriptor</code>, <code>Encoder</code>, <code>Decoder</code>, etc., without breaking existing clients. This change is expected to have no effect on existing clients, and no action from your side is required.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md">org.jetbrains.kotlinx:kotlinx-serialization-json's changelog</a>.</em></p> <blockquote> <h1>1.8.0 / 2025-01-06</h1> <p>This release contains all of the changes from 1.8.0-RC. Kotlin 2.1.0 is used as a default, while upcoming 2.1.10 is also supported. Also added small bugfixes, including speedup of ProtoWireType.from (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2879">#2879</a>).</p> <h1>1.8.0-RC / 2024-12-10</h1> <p>This is a release candidate for the next version. It is based on Kotlin 2.1.0 and includes a few new features, as well as bugfixes and improvements:</p> <h2><code>@JsonIgnoreUnknownKeys</code> annotation</h2> <p>Previously, only global setting <code>JsonBuilder.ignoreUnknownKeys</code> controlled whether Json parser would throw exception if input contained a property that was not declared in a <code>@serializable</code> class. There were <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/1420">a lot of complaints</a> that this setting is not flexible enough. To address them, we added new <code>@JsonIgnoreUnknownKeys</code> annotation that can be applied on a per-class basis. With this annotation, it is possible to allow unknown properties for annotated classes, while general decoding methods (such as <code>Json.decodeFromString</code> and others) would still reject them for everything else. See details in the corresponding <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/pull/2874">PR</a>.</p> <h2>Stabilization of <code>SerialDescriptor</code> API and <code>@SealedSerializationApi</code> annotation</h2> <p><code>SerialDescriptor</code>, <code>SerialKind</code>, and related API has been around for a long time and has proven itself useful. The main reason <code>@ExperimentalSerializationApi</code> was on SerialDescriptor's properties is that we wanted to discourage people from subclassing it. Fortunately, Kotlin 2.1 provides a special mechanism for such a case — <a href="https://kotlinlang.org/docs/opt-in-requirements.html#opt-in-to-inherit-from-a-class-or-interface">SubclassOptInRequired</a>. New <code>kotlinx.serialization.SealedSerializationApi</code> annotation designates APIs as public for use, but closed for implementation — the case for SerialDescriptor, which is a non-sealed interface for technical reasons. Now you can use most of <code>SerialDescriptor</code> and its builders API without the need to opt-in into experimental serialization API. See the <a href="https://redirect.github.com/Kotlin/kotlinx.serialization/pull/2827">PR</a> for more details.</p> <p><em>Note</em>: All <code>SerialKind</code>s are stable API now, except <code>PolymorphicKind</code> — we may want to expand it in the future.</p> <h2>Generate Java 8's default method implementations in interfaces</h2> <p><strong>TL;DR This change ensures better binary compatibility in the future for library. You should not experience any difference from it.</strong></p> <p>kotlinx.serialization library contains a lot of interfaces with default method implementations. Historically, Kotlin compiled a synthetic <code>DefaultImpls</code> class for them. <a href="https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces/">Starting from Kotlin 1.4</a>, it was possible to compile them using as Java 8's <code>default</code> methods to ensure that new methods can still be added to interfaces without the need for implementors to recompile. To preserve binary compatibility with existing clients, a special <code>all-compatbility</code> mode is supported in compiler</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/f9f160a680da9f92c3bb121ae3644c96e57ba42e"><code>f9f160a</code></a> Prepare 1.8.0 release</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/f17c83fea1a4797fef02b9b3ce0eba61e8a0996a"><code>f17c83f</code></a> Fix CompositeDecoder.decodeSequentially() documentation</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/c645f52545d21562b27e2b76b1e1d6407453fe13"><code>c645f52</code></a> Restructure source-sets-conventions.gradle.kts</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/fa797bc8c48057308274303daf2a730d6954ecfb"><code>fa797bc</code></a> Add tests for UuidSerializer that were supposed to work in Kotlin 2.1 (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2884">#2884</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/d62f3b8a4b5292dac2575b846b5fd4cfe679ce65"><code>d62f3b8</code></a> Speedup ProtoWriteType.from (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2879">#2879</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/db217e4ca83715eb0bd2b0777c5428f8c060eac2"><code>db217e4</code></a> Merge remote-tracking branch 'origin/master' into dev</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/69050a369fa4814000935e81e04632a7e335184e"><code>69050a3</code></a> Prepare 1.8.0-RC release (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2880">#2880</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/c4f798cd99f3c145abd7c0853cdbf42af930c092"><code>c4f798c</code></a> Update to Kotlin 2.1.0 and some housekeeping: (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2877">#2877</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/7204a36953f8b156fa19786e2c26464bc599307b"><code>7204a36</code></a> [Cbor] correctly skip structures with ignoreUnknownKeys setting (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2873">#2873</a>)</li> <li><a href="https://github.com/Kotlin/kotlinx.serialization/commit/aee63365ee2777ebe890121c99cbc37ecc2ee70f"><code>aee6336</code></a> Introduce <a href="https://github.com/JsonIgnoreUnknownKeys"><code>@JsonIgnoreUnknownKeys</code></a> annotation (<a href="https://redirect.github.com/Kotlin/kotlinx.serialization/issues/2874">#2874</a>)</li> <li>Additional commits viewable in <a href="https://github.com/Kotlin/kotlinx.serialization/compare/v1.7.3...v1.8.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.jetbrains.kotlinx:kotlinx-serialization-json&package-manager=gradle&previous-version=1.7.3&new-version=1.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Loading branch information