proto-lens-0.2.2.0: A lens-based implementation of protocol buffers in Haskell.

Safe HaskellNone
LanguageHaskell98

Data.ProtoLens.TextFormat

Description

Functions for converting protocol buffers to a human-readable text format.

Synopsis

Documentation

showMessage :: Message msg => msg -> String Source #

Convert the given message into a human-readable String.

showMessageShort :: Message msg => msg -> String Source #

Serializes a proto as a string on a single line. Useful for debugging and error messages like .DebugString() in other languages.

pprintMessage :: Message msg => msg -> Doc Source #

Pretty-print the given message into a human-readable form.

readMessage :: Message msg => Text -> Either String msg Source #

Parse a Message from the human-readable protocol buffer text format.

readMessageOrDie :: Message msg => Text -> msg Source #

Parse a Message from the human-readable protocol buffer text format. Throws an error if the parse was not successful.