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
Interesting. I have no idea what idiomatic Protocol Buffers code would do or look like with enum fields like these. By chance, did you look into what other bindings (Python ?) do?
As always, we are open to careful PRs especially when they manage to remain narrow (and ideally follow our coding conventions so ChangeLog entries appreciated as are added unit tests).
With #79 toJSON has almost the same powers except that use_integers_for_enums is not exposed. We can fix that.
So I would suggest enhancing the current as.list with the same interface as toJSON, or maybe creating a new method toList. Note that python functions and toJSON are recursive and I think that's what most users would want.
Unfortunately json parsing does not preserve the protobuf type. I have opened protocolbuffers/protobuf#8727 for that but I don't think it will be addressed soon, so I would rather get the full featured as.list in here. Ideally such a functions should be able to handle google built-in types like Date, Timestamp etc. and convert into R types automatically.
I don't see a straightforward way to retrieve an enum name from the objects, only the id.
I would like to have "HOME" instead.
Similarly, I would also expect
as.list
to be able to return names instead of numbers.The text was updated successfully, but these errors were encountered: