summaryrefslogtreecommitdiff
path: root/formats/json
diff options
context:
space:
mode:
authorLeonid Startsev <sandwwraith@users.noreply.github.com>2023-07-24 16:14:19 +0200
committerGitHub <noreply@github.com>2023-07-24 16:14:19 +0200
commit245030b1b8f2eefe41feb2e5d5baf4aeba37b08f (patch)
tree2f22f362be96bbd3841e4b793ceff531d2c28d00 /formats/json
parente41097eb9abafcb7df818ca2d58cdc928bc22311 (diff)
downloadkotlinx.serialization-245030b1b8f2eefe41feb2e5d5baf4aeba37b08f.tar.gz
Update to Kotlin 1.9.0: (#2364)
- Apply @ExperimentalNativeApi on WeakReference usages - Drop Legacy JS compiler as it is deprecated - Update API Dump with .entries enum properties - Update yarn.lock
Diffstat (limited to 'formats/json')
-rw-r--r--formats/json/api/kotlinx-serialization-json.api1
-rw-r--r--formats/json/nativeMain/src/kotlinx/serialization/json/JsonSchemaCache.kt2
2 files changed, 3 insertions, 0 deletions
diff --git a/formats/json/api/kotlinx-serialization-json.api b/formats/json/api/kotlinx-serialization-json.api
index ec79e13d..3b97d174 100644
--- a/formats/json/api/kotlinx-serialization-json.api
+++ b/formats/json/api/kotlinx-serialization-json.api
@@ -2,6 +2,7 @@ public final class kotlinx/serialization/json/DecodeSequenceMode : java/lang/Enu
public static final field ARRAY_WRAPPED Lkotlinx/serialization/json/DecodeSequenceMode;
public static final field AUTO_DETECT Lkotlinx/serialization/json/DecodeSequenceMode;
public static final field WHITESPACE_SEPARATED Lkotlinx/serialization/json/DecodeSequenceMode;
+ public static fun getEntries ()Lkotlin/enums/EnumEntries;
public static fun valueOf (Ljava/lang/String;)Lkotlinx/serialization/json/DecodeSequenceMode;
public static fun values ()[Lkotlinx/serialization/json/DecodeSequenceMode;
}
diff --git a/formats/json/nativeMain/src/kotlinx/serialization/json/JsonSchemaCache.kt b/formats/json/nativeMain/src/kotlinx/serialization/json/JsonSchemaCache.kt
index 520a3b6d..49619979 100644
--- a/formats/json/nativeMain/src/kotlinx/serialization/json/JsonSchemaCache.kt
+++ b/formats/json/nativeMain/src/kotlinx/serialization/json/JsonSchemaCache.kt
@@ -5,6 +5,7 @@
package kotlinx.serialization.json
import kotlinx.serialization.json.internal.*
+import kotlin.experimental.ExperimentalNativeApi
import kotlin.native.ref.*
import kotlin.random.*
import kotlin.native.concurrent.*
@@ -26,6 +27,7 @@ private val jsonToCache: MutableMap<WeakJson, DescriptorSchemaCache> = mutableMa
/**
* Because WeakReference itself does not have proper equals/hashCode
*/
+@OptIn(ExperimentalNativeApi::class)
private class WeakJson(json: Json) {
private val ref = WeakReference(json)
private val initialHashCode = json.hashCode()