JuliaIO / ProtoBuf.jl

Julia protobuf implementation
Other
205 stars 55 forks source link

Issues with encoding of dictionaries #233

Closed JamieMair closed 12 months ago

JamieMair commented 1 year ago

While working on another feature for TensorBoardLogger.jl, I had to write a workaround encoder for dictionaries (see the code here). I think I was able to track down the discrepancy between ProtoBuf.jl and the protocol in files one, two and three, where Dict objects are encoded and decoded.

Looking at the protobuf documentation, it seems that dictionaries (or maps in their terms) is made up of repeated messages of key-value pairs (docs link). At least in Tensorboard, they expect each key-value pair to be a repeated message in a dictionary field.

Drvi commented 12 months ago

Fixed by https://github.com/JuliaIO/ProtoBuf.jl/pull/234