We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello! Is there some sort of generic runtime representation of protobuf types generated from protobuf files? Something similar to this (but for protobuf) https://hackage.haskell.org/package/aeson-1.5.3.0/docs/Data-Aeson.html#t:Value
The text was updated successfully, but these errors were encountered:
The Message instance is probably the closest thing to what you're asking. For each type we generate fieldsByTag and fieldsByName which let you walk through a proto value using type-safe reflection. You can look at proto-lens-arbitrary for an example how to use it: http://hackage.haskell.org/package/proto-lens-arbitrary-0.1.2.9/docs/src/Data.ProtoLens.Arbitrary.html#arbitraryMessage
Message
fieldsByTag
fieldsByName
proto-lens-arbitrary
Sorry, something went wrong.
Thanks for reply, @judah ! I see, there is type-related information like this http://hackage.haskell.org/package/proto-lens-arbitrary-0.1.2.9/docs/src/Data.ProtoLens.Arbitrary.html#arbitraryScalarValue I mean Int32Field, Int64Field, UInt32Field etc. This is great, but this information is segregated from runtime values. Is there something similar to runtime AST (like in Aeson)? I want to recursively foldr real message with real values in generic way, and looking for something like
Int32Field
Int64Field
UInt32Field
data ScalarValue = Int32Value Int32 | Int64Value Int64 | BytesValue ByteString | ... etc
And similar runtime AST for composite types
No branches or pull requests
Hello! Is there some sort of generic runtime representation of protobuf types generated from protobuf files? Something similar to this (but for protobuf) https://hackage.haskell.org/package/aeson-1.5.3.0/docs/Data-Aeson.html#t:Value
The text was updated successfully, but these errors were encountered: