Support unknown Any types in JSON serialization
What language does this apply to? C++
Describe the problem you are trying to solve. Having an unknown type in Any (including cases embedded Any in other message) will result MessageToJsonString fail with unknown type.
Describe the solution you'd like
Have an option in JsonPrintOptions, to serialize unknown Any as {"type_url": "type.googleapis.com/FQTypeName", "value": "<base64 encoded binary serialized proto>"}, similar to what text format does.
Describe alternatives you've considered
Additional context This is useful in Envoy (https://github.com/envoyproxy/envoy) context we might have Any in logging object which is serialized by WebAssembly. Also to make sure Envoy can dump config with unknown typed config for extensions.
We don't want options. Serialize it always, or always don't. There is no option.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.
This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.