summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonid Startsev <sandwwraith@gmail.com>2022-05-11 14:55:47 +0300
committerLeonid Startsev <sandwwraith@gmail.com>2022-05-11 15:23:55 +0300
commit9650a28c07373e08eda6eeba96d46225f8576da1 (patch)
tree3505fec8bf3391e06788fdab694e744bf4c8886b
parent4af6772d39b3e7d7070d9d4f12f3fbb61302b412 (diff)
downloadkotlinx.serialization-upstream-1.3.3-release.tar.gz
Add changelog; fix Kotlin update & merge issuesupstream/v1.3.3upstream-1.3.3-release
-rw-r--r--CHANGELOG.md29
-rw-r--r--build.gradle16
-rw-r--r--formats/json/api/kotlinx-serialization-json.api2
-rw-r--r--guide/test/BasicSerializationTest.kt2
4 files changed, 39 insertions, 10 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0e3155d3..621bf09e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,32 @@
+1.3.3 / 2022-05-11
+==================
+
+This release contains support for Protocol Buffers packed fields, as well as several bugfixes.
+It uses Kotlin 1.6.21 by default.
+
+### Protobuf packed fields
+
+It 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).
+To mark the field as packed, use `@ProtoPacked` annotation on it.
+Note it affects only `List` and primitive collection such as `IntArray` types.
+With this feature, it is now possible to decode Proto3 messages, where all repeated fields are packed by default.
+[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.
+
+Many thanks to [Paul de Vrieze](https://github.com/pdvrieze) for his valuable contribution!
+
+### Other improvements & small features
+
+ * Incorporate JsonPath into exception messages (#1841)
+ * Mark block in corresponding encodeStructure/decodeStructure extensions as crossinline to reduce amount of bytecode (#1917)
+ * Support serialization of compile-time `Collection<E>` properties that are not lists at the runtime (#1821)
+ * Best-effort kotlin reflect avoidance in serializer(Type) (#1819)
+
+### Bugfixes
+
+ * Iterate over element indices in ObjectSerializer in order to let the format skip unknown keys (#1916)
+ * Correctly support registering both default polymorphic serializer & deserializer (#1849)
+ * Make error message for captured generic type parameters much more straightforward (#1863)
+
1.3.2 / 2021-12-23
==================
diff --git a/build.gradle b/build.gradle
index b8d67319..69aa68dd 100644
--- a/build.gradle
+++ b/build.gradle
@@ -12,16 +12,16 @@ buildscript {
if (project.hasProperty("library.version")) {
ext.overriden_version = property('library.version')
}
- ext.experimentalsEnabled = ["-progressive", "-Xopt-in=kotlin.Experimental",
- "-Xopt-in=kotlin.ExperimentalMultiplatform",
- "-Xopt-in=kotlinx.serialization.InternalSerializationApi"
+ ext.experimentalsEnabled = ["-progressive", "-opt-in=kotlin.Experimental",
+ "-opt-in=kotlin.ExperimentalMultiplatform",
+ "-opt-in=kotlinx.serialization.InternalSerializationApi"
]
- ext.experimentalsInTestEnabled = ["-progressive", "-Xopt-in=kotlin.Experimental",
- "-Xopt-in=kotlin.ExperimentalMultiplatform",
- "-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
- "-Xopt-in=kotlinx.serialization.InternalSerializationApi",
- "-Xopt-in=kotlin.ExperimentalUnsignedTypes"
+ ext.experimentalsInTestEnabled = ["-progressive", "-opt-in=kotlin.Experimental",
+ "-opt-in=kotlin.ExperimentalMultiplatform",
+ "-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
+ "-opt-in=kotlinx.serialization.InternalSerializationApi",
+ "-opt-in=kotlin.ExperimentalUnsignedTypes"
]
ext.koverEnabled = property('kover.enabled') ?: true
diff --git a/formats/json/api/kotlinx-serialization-json.api b/formats/json/api/kotlinx-serialization-json.api
index eb91626e..1fe1440e 100644
--- a/formats/json/api/kotlinx-serialization-json.api
+++ b/formats/json/api/kotlinx-serialization-json.api
@@ -270,7 +270,7 @@ public final class kotlinx/serialization/json/JsonObject : kotlinx/serialization
public fun containsValue (Lkotlinx/serialization/json/JsonElement;)Z
public final fun entrySet ()Ljava/util/Set;
public fun equals (Ljava/lang/Object;)Z
- public synthetic fun get (Ljava/lang/Object;)Ljava/lang/Object;
+ public final synthetic fun get (Ljava/lang/Object;)Ljava/lang/Object;
public final fun get (Ljava/lang/Object;)Lkotlinx/serialization/json/JsonElement;
public fun get (Ljava/lang/String;)Lkotlinx/serialization/json/JsonElement;
public fun getEntries ()Ljava/util/Set;
diff --git a/guide/test/BasicSerializationTest.kt b/guide/test/BasicSerializationTest.kt
index 5a2f8a55..74c4433d 100644
--- a/guide/test/BasicSerializationTest.kt
+++ b/guide/test/BasicSerializationTest.kt
@@ -109,7 +109,7 @@ class BasicSerializationTest {
@Test
fun testExampleClasses12() {
captureOutput("ExampleClasses12") { example.exampleClasses12.main() }.verifyOutputLinesStart(
- "Exception in thread \"main\" kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 52: Expected string literal but 'null' literal was found.",
+ "Exception in thread \"main\" kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 52: Expected string literal but 'null' literal was found at path: $.language",
"Use 'coerceInputValues = true' in 'Json {}` builder to coerce nulls to default values."
)
}