kotlinx.serialization

Frameworks & LibrariesApache-2.0

Kotlin's multiplatform serialization library: JSON, CBOR, ProtoBuf and more.

Latest v1.13.0 · by JetBrainsWritten in KotlinWebsiteKotlin/kotlinx.serializationRSS

Release activity

Release activity — 6 releases across 6 days in the last year. Each cell is one day; darker means more releases that day. Older weeks are hidden at this screen width.
AugSepOctNov
SundayNo releases on Aug 2, 2026No releases on Aug 9, 2026No releases on Aug 16, 2026No releases on Aug 23, 2026No releases on Aug 30, 2026No releases on Sep 6, 2026No releases on Sep 13, 2026No releases on Sep 20, 2026No releases on Sep 27, 2026No releases on Oct 4, 2026No releases on Oct 11, 2026No releases on Oct 18, 2026No releases on Oct 25, 2026No releases on Nov 1, 2026No releases on Nov 8, 2026No releases on Nov 15, 2026
MondayNo releases on Aug 3, 2026No releases on Aug 10, 2026No releases on Aug 17, 2026No releases on Aug 24, 2026No releases on Aug 31, 2026No releases on Sep 7, 2026No releases on Sep 14, 2026No releases on Sep 21, 2026No releases on Sep 28, 2026No releases on Oct 5, 2026No releases on Oct 12, 20261 release on Oct 19, 2026No releases on Oct 26, 2026No releases on Nov 2, 2026No releases on Nov 9, 2026
TuesdayNo releases on Aug 4, 2026No releases on Aug 11, 2026No releases on Aug 18, 2026No releases on Aug 25, 2026No releases on Sep 1, 2026No releases on Sep 8, 2026No releases on Sep 15, 2026No releases on Sep 22, 2026No releases on Sep 29, 2026No releases on Oct 6, 2026No releases on Oct 13, 2026No releases on Oct 20, 2026No releases on Oct 27, 2026No releases on Nov 3, 2026No releases on Nov 10, 2026
WednesdayNo releases on Aug 5, 2026No releases on Aug 12, 2026No releases on Aug 19, 2026No releases on Aug 26, 2026No releases on Sep 2, 2026No releases on Sep 9, 2026No releases on Sep 16, 2026No releases on Sep 23, 2026No releases on Sep 30, 2026No releases on Oct 7, 2026No releases on Oct 14, 2026No releases on Oct 21, 2026No releases on Oct 28, 2026No releases on Nov 4, 20261 release on Nov 11, 2026
ThursdayNo releases on Aug 6, 2026No releases on Aug 13, 2026No releases on Aug 20, 2026No releases on Aug 27, 2026No releases on Sep 3, 2026No releases on Sep 10, 2026No releases on Sep 17, 2026No releases on Sep 24, 2026No releases on Oct 1, 2026No releases on Oct 8, 2026No releases on Oct 15, 2026No releases on Oct 22, 2026No releases on Oct 29, 2026No releases on Nov 5, 2026No releases on Nov 12, 2026
FridayNo releases on Aug 7, 2026No releases on Aug 14, 2026No releases on Aug 21, 2026No releases on Aug 28, 20261 release on Sep 4, 2026No releases on Sep 11, 2026No releases on Sep 18, 2026No releases on Sep 25, 2026No releases on Oct 2, 2026No releases on Oct 9, 2026No releases on Oct 16, 2026No releases on Oct 23, 2026No releases on Oct 30, 2026No releases on Nov 6, 2026No releases on Nov 13, 2026
SaturdayNo releases on Aug 8, 2026No releases on Aug 15, 2026No releases on Aug 22, 2026No releases on Aug 29, 2026No releases on Sep 5, 2026No releases on Sep 12, 2026No releases on Sep 19, 2026No releases on Sep 26, 2026No releases on Oct 3, 2026No releases on Oct 10, 2026No releases on Oct 17, 2026No releases on Oct 24, 2026No releases on Oct 31, 2026No releases on Nov 7, 2026No releases on Nov 14, 2026

6 releases in the last year

Changelog

v1.13.0

Latest
Changed 2
  • Reverted the 1.12.0 change that made the Json format intercept almost all exceptions thrown by serializers and wrap them into a JsonException with JSON path and input information
  • Rewrote JsonElement.toString, improving its performance by up to twofold on some benchmarks

From kotlinx.serialization

This release is based on Kotlin 2.4.10 and reverts a breaking change introduced in 1.12.0.

Besides that, it improves JsonElement.toString performance.

Exceptions rework rollback

In 1.12.0, Json format started intercepting almost all exceptions thrown by serializers during serialization and deserialization, and wrapping them into a JsonException with additional information about JSON path and input.

The impact of the change was underestimated, and it was decided to revert the change.

Performance improvements

JsonElement.toString was rewritten and its improved twofold on some benchmarks. See #3296 and #3299 for details.

View originalPermalink
How v1.13.0 went

v1.12.0

Added 2
  • Added a limit on the maximum nesting depth of Json documents, producing a JsonDecodingException instead of a stack overflow error
  • Added support for unknown fields in Protobuf messages via the ProtoUnknownFieldHolder class
Changed 12
  • Stabilized a large portion of the Json and Core APIs, including the @KeepGeneratedSerializer and @SerialInfo annotations, JsonNamingStrategy, and ContextualSerializer
  • Stabilized various descriptor builders such as listDescriptor and the JsonElementBuilder addAll functions
  • Removed experimental annotations from the kotlin.time.Instant and kotlin.uuid.Uuid serializers
  • Improved decoding performance from Okio and kotlinx-io sources with an ASCII-specific parser
  • Made decoding significantly faster when JsonElement is present in serializable classes
  • Improved overall performance on large strings by up to 30%
Fixed 6
  • CBOR correctly decodes CborLabel values
  • Fixed Protobuf schema generation for inlined value classes
  • Fixed a Protobuf oneof default value bug
  • Fixed polymorphic deserialization error with a subclass using JsonTransformingSerializer
  • Aligned collections' SerialDescriptors with the contract
  • Removed leading whitespace from Proguard rules
Deprecated 1
  • Deprecated the ChunkedDecoder interface, which is planned for future removal
View originalRead the notes
How v1.12.0 went
v1.12.0-RCPre-release

1.12.0-RC

Added 2
  • Json maximum nesting depth is limited during parsing, producing a JsonDecodingException instead of a stack overflow error
  • Protobuf supports unknown fields via the new ProtoUnknownFieldHolder class, allowing unknown fields to be decoded, stored, and retransmitted
Changed 10
  • Stabilized a large portion of the Json and Core APIs, including @KeepGeneratedSerializer, @SerialInfo, JsonNamingStrategy, and ContextualSerializer
  • Stabilized descriptor builders such as listDescriptor and JsonElementBuilder's addAll functions
  • ASCII-specific parser brings decoding performance from Okio and kotlinx-io sources closer to decoding from String
  • Decoding is significantly faster when JsonElement is present in serializable classes
  • Overall performance improved by up to 30% on large strings
  • Every exception thrown during deserialization is wrapped by the decoder into a JsonException, and JsonDecodingException includes Json path and input context
Fixed 5
  • CBOR correctly decodes CborLabel values
  • Protobuf oneof default value bug is fixed
  • Protobuf schema generation for inlined value classes is fixed
  • Polymorphic deserialization error with a subclass using JsonTransformingSerializer is fixed
  • Collections' SerialDescriptors are aligned with the contract
Deprecated 2
  • ChunkedDecoder interface is deprecated and planned for future removal due to lack of demand
  • Setters in JsonConfiguration are marked as Deprecated (HIDDEN)
View originalRead the notes
How v1.12.0-RC went
v1.11.0

1.11.0

Added 2
  • Make JsonException, JsonDecodingException, and JsonEncodingException public, exposing properties such as shortMessage, path, and offset (experimental API)
  • Add exceptionsWithDebugInfo property to JsonConfiguration to allow hiding user input from exception messages
Changed 2
  • CBOR: Relax value range check when decoding numbers
  • Use a specialized writeDecimalLong method for IO stream integrations in Json
View originalRead the notes
How v1.11.0 went
v1.10.0

1.10.0

Added 2
  • New subclassesOfSealed utility automatically registers sealed subclass serializers in polymorphic modules
  • MissingFieldException now includes .serialName for clearer diagnostics
Changed 13
  • Release is based on Kotlin 2.3.0 and includes all changes from 1.10.0-RC
  • Json configuration options decodeEnumsCaseInsensitive, allowTrailingComma, allowComments, and prettyPrintIndent are no longer experimental
  • The @EncodeDefault annotation and its modes are no longer experimental
  • The JsonUnquotedLiteral constructor function is no longer experimental
  • JsonPrimitive constructor function overloads that accept unsigned types are no longer experimental
  • JSON DSL functions on JsonElement with Nothing? overloads are no longer experimental
Fixed 3
  • ProtoBuf packing of Kotlin unsigned types is corrected
  • The typo in the BIGNUM_NEGATIVE tag name is corrected
  • Various CBOR decoder bugs are fixed to be stricter and consistent with the specification
View originalRead the notes
How v1.10.0 went
v1.10.0-RCPre-release

1.10.0-RC

Added 1
  • New subclassesOfSealed utility to automatically register sealed subclasses serializers in polymorphic modules
Changed 13
  • Json configuration options decodeEnumsCaseInsensitive, allowTrailingComma, allowComments, and prettyPrintIndent are no longer experimental
  • The @EncodeDefault annotation and its modes are no longer experimental
  • The JsonUnquotedLiteral constructor function is no longer experimental
  • JsonPrimitive constructor function overloads that accept unsigned types are no longer experimental
  • JSON DSL functions on JsonElement with Nothing? overloads are no longer experimental
  • The library code is fully marked for Kotlin 2.3.0's unused return value checker, so warnings are reported for unused calls such as Json.encodeToString(...) when the feature is enabled
Fixed 2
  • Fixed the type in the BIGNUM_NEGATIVE tag name
  • Fixed various CBOR decoder bugs to be stricter and consistent with the specification
View originalRead the notes
How v1.10.0-RC went
v1.9.0

1.9.0

Added 2
  • Added InstantSerializer for kotlin.time.Instant, which serializes the instant using its string representation
  • Added InstantComponentSerializer for kotlin.time.Instant, which serializes the instant as its components
Changed 1
  • Updated Kotlin version to 2.2.0
Fixed 2
  • Fixed resize in JsonPath
  • Fixed proguard rules for obfuscation so they work correctly
View originalRead the notes
How v1.9.0 went
v1.8.1

1.8.1

Added 2
  • Implemented encoding null in key and value of a map in Protobuf
  • Added watchosDeviceArm64 to the Okio integration module
Changed 4
  • Updated Kotlin version to 2.1.20
  • Made the type argument in JsonTransformingSerializer nullable
  • Use SPDX identifier in POMs
  • Updated kotlinx-io version to 0.6.0
Fixed 3
  • Fixed incorrect enum coercion during deserialization from JsonElement
  • Supplied proper equals(), hashCode(), and toString() for SerialDescriptor() wrapper
  • Do not encode empty packed collections in protobuf
View originalRead the notes
How v1.8.1 went
v1.8.0

1.8.0

Added 3
  • Added a new @JsonIgnoreUnknownKeys annotation that allows unknown properties to be ignored on a per-class basis, without changing the global JsonBuilder.ignoreUnknownKeys setting
  • Added an inline reified version of encodeToString as a Json member to streamline usage for newcomers
  • Introduced the @SealedSerializationApi annotation to mark APIs that are public for use but closed for implementation
Changed 4
  • Stabilized the SerialDescriptor API and most SerialKind types, which are no longer experimental, except PolymorphicKind
  • Generated Java 8 default method implementations in interfaces using the Kotlin all-compatibility mode, enabling future methods to be added to interfaces without breaking existing clients
  • Kotlin 2.1.0 is used as the default, with upcoming Kotlin 2.1.10 also supported
  • Sped up ProtoWireType.from
Fixed 6
  • Correctly skip structures when the Cbor.ignoreUnknownKeys setting is enabled
  • Handle a missing system property without throwing a NullPointerException
  • Kept the INSTANCE field and serializer function for serializable objects in R8 full mode
  • Correctly parse invalid numbers in JsonLiteral.long and other extensions
  • Correctly handle serial name conflicts for different classes in SerializersModule.overwriteWith
  • Skip kind and discriminator collision checks for subclasses' polymorphic serializers when Json.classDiscriminatorMode is set to NONE
View originalRead the notes
How v1.8.0 went

v1.8.0-RC

Pre-release
Added 3
  • Add @JsonIgnoreUnknownKeys annotation that allows unknown properties to be ignored on a per-class basis
  • Add SealedSerializationApi annotation for APIs that are public for use but closed for implementation
  • Add inline reified encodeToString as a Json member to streamline usage for newcomers
Changed 2
  • Stabilize SerialDescriptor API and most SerialKind types so they no longer require opting in to experimental serialization API
  • Generate Java 8 default method implementations in interfaces using the all-compatibility compiler mode to preserve binary compatibility
Fixed 6
  • Correctly skip structures when Cbor.ignoreUnknownKeys is set
  • Handle missing system property without throwing a NullPointerException
  • Keep INSTANCE field and serializer function for serializable objects in R8 full mode
  • Correctly parse invalid numbers in JsonLiteral.long and other extensions
  • Correctly handle serial name conflicts for different classes in SerializersModule.overwriteWith
  • Do not check kind or discriminator collisions for subclasses' polymorphic serializers when Json.classDiscriminatorMode is NONE
View originalRead the notes
How v1.8.0-RC went
v1.7.3

1.7.3

Changed 2
  • Use explicit kotlin-stdlib and kotlin-test versions from the version catalog
  • Clarified the example for SerializationException
Fixed 4
  • Resolved the inability to sync certain projects into Android Studio/IntelliJ IDEA that was introduced in 1.7.2
  • Resolved exceptions thrown from custom Uuid serializers
  • Check against serialName instead of simpleClassName
  • Ignore NoClassDefFoundError when initializing the builtins map for the serializer() function
Removed 1
  • Dropped usage of the deprecated Any?.freeze() function in the Kotlin/Native target
View originalRead the notes
How v1.7.3 went
View all

Discussion

If you publish kotlinx.serialization, you can claim this product by proving you administer its repository.