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(
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
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments