Properly implement google.protobuf.Any json serde
Author: benlueloCreated Nov 1, 2023Updated Nov 22, 2025
LabelsC-enhancementS-todo-comment
The json representation for google.protobuf.Any is a nightmare: https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/any.proto#L100-L127
But we should probably implement it correctly.
The biggest issue is their notion of "well-known types with a custom json representation" - google.protobuf.Duration is mentioned, and it appears that "well-known" here refers to https://protobuf.dev/reference/protobuf/google.protobuf/, but I'm not sure how best to go about implementing this.
Source: unionlabs/union