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

Protobuf - `sintXX`, `fixedXX` and `sfixedXX` map keys and values not serialized / deserialized correctly.

Open Dogacel opened this issue 2 years ago • 0 comments

Describe the bug

Protobuf maps with type sint32, sint64, fixed32, fixed64, sfixed32, and sfixed64 can't be serialized & deserialized correctly.

To Reproduce

    @ProtoNumber(62) val mapFixed32Fixed32: Map<Int, Int> = emptyMap(),
    @ProtoNumber(63) val mapFixed64Fixed64: Map<Long, Long> = emptyMap(),
    @ProtoNumber(64) val mapSfixed32Sfixed32: Map<Int, Int> = emptyMap(),
    @ProtoNumber(65) val mapSfixed64Sfixed64: Map<Long, Long> = emptyMap(),

Are not serialized / deserialized correctly.

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