Skip to content

Commit 6984f69

Browse files
committed
cleanups
1 parent 718422f commit 6984f69

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

formats/cbor/commonMain/src/kotlinx/serialization/cbor/Cbor.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ public sealed class Cbor(
3434
CborConfiguration(
3535
encodeDefaults = false,
3636
ignoreUnknownKeys = false,
37-
encodeKeyTags = true,
38-
encodeValueTags = true,
39-
encodeObjectTags = true,
40-
verifyKeyTags = true,
41-
verifyValueTags = true,
42-
verifyObjectTags = true,
37+
encodeKeyTags = false,
38+
encodeValueTags = false,
39+
encodeObjectTags = false,
40+
verifyKeyTags = false,
41+
verifyValueTags = false,
42+
verifyObjectTags = false,
4343
useDefiniteLengthEncoding = false,
4444
preferCborLabelsOverNames = false,
4545
alwaysUseByteString = false

formats/cbor/commonMain/src/kotlinx/serialization/cbor/CborEncoder.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,4 @@ public interface CborEncoder : Encoder {
3131
* Exposes the current [Cbor] instance and all its configuration flags. Useful for low-level custom serializers.
3232
*/
3333
public val cbor: Cbor
34-
35-
/**
36-
* Encodes the specified [byteArray] as a CBOR byte string.
37-
*/
38-
public fun encodeByteArray(byteArray: ByteArray)
3934
}

formats/cbor/commonMain/src/kotlinx/serialization/cbor/internal/CborElementSerializers.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public object CborByteStringSerializer : KSerializer<CborByteString> {
198198
override fun serialize(encoder: Encoder, value: CborByteString) {
199199
val cborEncoder = encoder.asCborEncoder()
200200
cborEncoder.encodeTags(value)
201-
cborEncoder.encodeByteArray(value.bytes)
201+
cborEncoder.encodeByteString(value.bytes)
202202
}
203203

204204
override fun deserialize(decoder: Decoder): CborByteString {

formats/cbor/commonMain/src/kotlinx/serialization/cbor/internal/Encoder.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ internal sealed class CborWriter(
2929
protected val output: ByteArrayOutput,
3030
) : AbstractEncoder(), CborEncoder {
3131

32-
override fun encodeByteArray(byteArray: ByteArray) {
32+
internal fun encodeByteString(byteArray: ByteArray) {
3333
getDestination().encodeByteString(byteArray)
3434
}
3535

36+
3637
protected var isClass = false
3738

3839
protected var encodeByteArrayAsByteString = false

0 commit comments

Comments
 (0)