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
It is worth mentioning that with the standard library JSON marshaler it works fine, but it limits us to use only primitive types. Other proto types like StringValue, Int32Value, etc. produce the same issue in the opposite way (because they are just a wrapper on top of the primitive type).
I'm trying to embed two messages into one while using the
jsontag
extension to allow the marshaler to marshal it into a flat JSON string.I have the following messages in my
proto
file:In the generated
.pb.go
file, this is translated to typesMeta
andPerson
like this:But, the
jsonpb.Marshaler
produces the following JSON string:While the expected result is:
It is worth mentioning that with the standard library JSON marshaler it works fine, but it limits us to use only primitive types. Other proto types like
StringValue
,Int32Value
, etc. produce the same issue in the opposite way (because they are just a wrapper on top of the primitive type).Attached a gist with the relevant files.
Any help will be much appreciated!
The text was updated successfully, but these errors were encountered: