kotlinx.serialization icon indicating copy to clipboard operation
kotlinx.serialization copied to clipboard

Protobuf - `uintXX` packed array can't be serialized / deserialized

Open Dogacel opened this issue 2 years ago • 0 comments

Describe the bug

Types repeated uint32 and repeated uint64 that are packed can't be serialized / deserialized.

To Reproduce

    @ProtoNumber(77) @ProtoPacked val packedUint32: List<UInt> = emptyList(),
    @ProtoNumber(78) @ProtoPacked val packedUint64: List<ULong> = emptyList(),

Results in

Expected wire type 0, but found 2

Expected behavior

Should serialize and deserialize correctly.

Environment

  • Kotlin version: 1.9.0
  • Library version: 1.6.1
  • Kotlin platforms: All

Dogacel avatar Aug 23 '23 20:08 Dogacel