Skip to content

Commit 70bc1b6

Browse files
committed
Stabilize JsonPrimitive constructor functions that accept unsigned types
They're been around for some time without much complaints
1 parent 19afcda commit 70bc1b6

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

formats/json/commonMain/src/kotlinx/serialization/json/JsonElement.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,20 @@ public fun JsonPrimitive(value: Number?): JsonPrimitive {
6666
*
6767
* The value will be encoded as a JSON number.
6868
*/
69-
@ExperimentalSerializationApi
7069
public fun JsonPrimitive(value: UByte): JsonPrimitive = JsonPrimitive(value.toULong())
7170

7271
/**
7372
* Creates a numeric [JsonPrimitive] from the given [UShort].
7473
*
7574
* The value will be encoded as a JSON number.
7675
*/
77-
@ExperimentalSerializationApi
7876
public fun JsonPrimitive(value: UShort): JsonPrimitive = JsonPrimitive(value.toULong())
7977

8078
/**
8179
* Creates a numeric [JsonPrimitive] from the given [UInt].
8280
*
8381
* The value will be encoded as a JSON number.
8482
*/
85-
@ExperimentalSerializationApi
8683
public fun JsonPrimitive(value: UInt): JsonPrimitive = JsonPrimitive(value.toULong())
8784

8885
/**
@@ -91,7 +88,6 @@ public fun JsonPrimitive(value: UInt): JsonPrimitive = JsonPrimitive(value.toULo
9188
* The value will be encoded as a JSON number.
9289
*/
9390
@SuppressAnimalSniffer // Long.toUnsignedString(long)
94-
@ExperimentalSerializationApi
9591
public fun JsonPrimitive(value: ULong): JsonPrimitive = JsonUnquotedLiteral(value.toString())
9692

9793
/** Creates a [JsonPrimitive] from the given string. */

0 commit comments

Comments
 (0)