influxdata / influxdata/pbjson

Correct serialization of google::protobuf::Any

Open
#2 5 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
116
Forks
55
PR merge metrics
No merged PRs in 30d

Description

From https://developers.google.com/protocol-buffers/docs/proto3#json

> If the Any contains a value that has a special JSON mapping, it will be converted as follows: {"@type": xxx, "value": yyy}. Otherwise, the value will be converted into a JSON object, and the "@type" field will be inserted to indicate the actual data type.

Currently Any is not special cased and is therefore not serialized/deserialized to/from this custom representation. This should be fixed

Contributor guide

Open the contributing guide

Research direction

Start with the protobuf JSON mapping linked in the issue and trace how google::protobuf::Any is currently handled in this Rust generator. Compare the existing serialization and deserialization behavior with the documented @type/value representation. Done means Any supports the documented special mapping in both directions, with relevant tests added or updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.