You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Output is missing "@type" key-value. I'm going to treat dynamic message as the latter case, i.e. not having any special JSON mapping. So, above should have output
…rshaler (#361)
* Fix marshaling of Any containing object that implements JSONPBMarshaler.
* Add test for marshaling Any that implements JSONPBMarshaler.
* Add test for unmarshaling Any that implements JSONPBUnmarshaler.
Fixed issue #360.
Sample proto file
Sample code that stores a dynamic message into Foo.iany field.
Outputs:
Per JSON mapping spec (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.
Output is missing "@type" key-value. I'm going to treat dynamic message as the latter case, i.e. not having any special JSON mapping. So, above should have output
The text was updated successfully, but these errors were encountered: