Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.4.0 #568

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 18, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
org.jetbrains.kotlinx:kotlinx-serialization-json 1.4.0-RC -> 1.4.0 age adoption passing confidence

Release Notes

Kotlin/kotlinx.serialization

v1.4.0

==================

This is a candidate for the next big release with many new exciting features to try.
It uses Kotlin 1.7.10 by default.

Integration with Okio's BufferedSource and BufferedSink

Okio library by Square is a popular solution for fast and efficient IO operations on JVM, K/N and K/JS.
In 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.
These functions are called Json.decodeFromBufferedSource and Json.encodeToBufferedSink, respectively.
There's also decodeBufferedSourceToSequence that behaves similarly to decodeToSequence from Java streams integration, so you can lazily decode multiple objects the same way as before.

Note that these functions are located in a separate new artifact, so users who don't need them wouldn't find themselves dependent on Okio.
To include this artifact in your project, use the same group id org.jetbrains.kotlinx and artifact id kotlinx-serialization-json-okio.
To find out more about this integration, check new functions' documentation and corresponding pull requests:
#​1901 and #​1982.

Inline classes and unsigned numbers do not require experimental annotations anymore

Inline classes and unsigned number types have been promoted to a Stable feature in Kotlin 1.5,
and now we are promoting support for them in kotlinx.serialization to Stable status, too.
To be precise, we've removed all @ExperimentalSerializationApi annotations from functions related to inline classes encoding and decoding,
namely SerialDescriptor.isInline, Encoder.encodeInline, and some others. We've also updated related documentation article.

Additionally, all @ExperimentalUnsignedTypes annotations were removed completely,
so you can freely use types such as UInt and their respective serializers as a stable feature
without opt-in requirement.

Part of SerializationException's hierarchy is public now

When kotlinx.serialization 1.0 was released, all subclasses of SerializationException were made internal,
since they didn't provide helpful information besides the standard message.
Since then, we've received a lot of feature requests with compelling use-cases for exposing some of these internal types to the public.
In this release, we are starting to fulfilling these requests by making MissingFieldException public.
One 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 —
and then use its fields property to communicate the message better.
See the details in the corresponding PR.

In future releases, we'll continue work in this direction, and we aim to provide more useful public exception types & properties.
In the meantime, we've revamped KDoc for some methods regarding the exceptions — all of them now properly declare which exception types are allowed to be thrown.
For example, KSerializer.deserialize is documented to throw IllegalStateException to indicate problems unrelated to serialization, such as data validation in classes' constructors.

@​MetaSerializable annotation

This 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
as if they are annotated with @SerialInfo.

This 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.

Note: Kotlin 1.7.0 or higher is required for this feature to work.

Moving documentation from GitHub pages to kotlinlang.org

As 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.

Note 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.

Other improvements
  • Allow Kotlin's null literal in JSON DSL (#​1907) (thanks to Lukellmann)
  • Stabilize EmptySerializersModule (#​1921)
  • Boost performance of polymorphic deserialization in optimistic scenario (#​1919)
  • Added serializer for the kotlin.time.Duration class (plugin support comes in Kotlin 1.7.20) (#​1960)
  • Support tagged not null marks in TaggedEncoder/Decoder (#​1954) (thanks to EdwarDDay)
Bugfixes
  • Support quoting unsigned integers when used as map keys (#​1969)
  • Fix protocol buffer enum schema generation (#​1967) (thanks to mogud)
  • Support diamond inheritance of sealed interfaces in SealedClassSerializer (#​1958)
  • Support retrieving serializer for sealed interface (#​1968)
  • Fix misleading token description in JSON errors (#​1941) (thanks to TheMrMilchmann)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/org.jetbrains.kotlinx branch from de961e6 to ae2b10c Compare August 18, 2022 18:06
@jakepurple13 jakepurple13 merged commit 981ed5d into develop Aug 18, 2022
@jakepurple13 jakepurple13 deleted the renovate/org.jetbrains.kotlinx branch August 18, 2022 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant