If I copy struct.proto into a different namespace and convert messages based on it to JSON, the conversion adds extra maps to the data.
message built using struct.proto:
string_param: {
"oid": "HelloWorld",
"name": "My nice parameter",
"type": "STRING",
"readonly": true,
"widget": "default",
"precision": 2,
"value": "Evacuate the studio!"
}
message built using the same code but in a different namespace:
native_string_param: {
"oid": "HelloWorld",
"name": "My nice parameter",
"type": "STRING",
"readonly": true,
"widget": "default",
"precision": 2,
"value": {
"string_value": "Evacuate the studio!"
}
}
note the extra "string_value" mapping.
Is there a way to have MessageToJsonString treat the second type of message the same way as it does struct.proto ones?
Thanks!