Describe the bug
For mutableMapOf("key" to ""),
KotlinX Serialization ProtoBuf encodes both the key and value. Serialization and deserialization are fine.
However, in rs/prost, because the value is equal to the default value, it is omitted during encoding, so the final binary only contains the key.
When KotlinX Serialization ProtoBuf attempts to deserialize it, it throws a SerializationException: Element 'value' is missing.
rs/prost believes their implementation conforms to the specification: tokio-rs/prost/issues/99
Environment
- Kotlin version: 2.2.21
- Library version: 1.9.0