It’s surprising when Message.new(array: []).to_json_hash gets encoded to {}.
A decoded proto Message will still respond to the array field, supplying the default value. A JSON response however, will fail to do so. This seems inconsistent. Happy to submit a PR for this!
It’s surprising when
Message.new(array: []).to_json_hash
gets encoded to{}
.A decoded proto Message will still respond to the
array
field, supplying the default value. A JSON response however, will fail to do so. This seems inconsistent. Happy to submit a PR for this!