File tree Expand file tree Collapse file tree 4 files changed +9
-13
lines changed
formats/cbor/commonMain/src/kotlinx/serialization/cbor Expand file tree Collapse file tree 4 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,12 @@ public sealed class Cbor(
34
34
CborConfiguration (
35
35
encodeDefaults = false ,
36
36
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 ,
43
43
useDefiniteLengthEncoding = false ,
44
44
preferCborLabelsOverNames = false ,
45
45
alwaysUseByteString = false
Original file line number Diff line number Diff line change @@ -31,9 +31,4 @@ public interface CborEncoder : Encoder {
31
31
* Exposes the current [Cbor] instance and all its configuration flags. Useful for low-level custom serializers.
32
32
*/
33
33
public val cbor: Cbor
34
-
35
- /* *
36
- * Encodes the specified [byteArray] as a CBOR byte string.
37
- */
38
- public fun encodeByteArray (byteArray : ByteArray )
39
34
}
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ public object CborByteStringSerializer : KSerializer<CborByteString> {
198
198
override fun serialize (encoder : Encoder , value : CborByteString ) {
199
199
val cborEncoder = encoder.asCborEncoder()
200
200
cborEncoder.encodeTags(value)
201
- cborEncoder.encodeByteArray (value.bytes)
201
+ cborEncoder.encodeByteString (value.bytes)
202
202
}
203
203
204
204
override fun deserialize (decoder : Decoder ): CborByteString {
Original file line number Diff line number Diff line change @@ -29,10 +29,11 @@ internal sealed class CborWriter(
29
29
protected val output : ByteArrayOutput ,
30
30
) : AbstractEncoder(), CborEncoder {
31
31
32
- override fun encodeByteArray (byteArray : ByteArray ) {
32
+ internal fun encodeByteString (byteArray : ByteArray ) {
33
33
getDestination().encodeByteString(byteArray)
34
34
}
35
35
36
+
36
37
protected var isClass = false
37
38
38
39
protected var encodeByteArrayAsByteString = false
You can’t perform that action at this time.
0 commit comments