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
After some digging I found out that the options being passed to #to_json are a json::Ext::Generator::State object. This class implements #to_h and can be used as Hash arguments instead of raising.
Not sure if this is the right way. Would love to get some feedback on my PR #9513 and possibly get this issue resolved.
What version of protobuf and what language are you using?
Version: 3.19.4
Language: Ruby
What operating system (Linux, Windows, ...) and version?
Macos 12.0.1
What runtime / compiler are you using (e.g., python version or gcc version)
Ruby 3.1.0
What did you do?
When calling
to_json
on a Hash or Array that contains a protobuf message anArgumentError
is raised (Expected hash arguments. (ArgumentError)
).I've created this minimal reproducable example:
What did you expect to see
What did you see instead?
The text was updated successfully, but these errors were encountered: