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
let message =newTest1()
message.a =150## serializelet data =protoToText(message)
echo data # a : 150echo message # would use `$` as alias to serializeText## deserializelet message2 =Test1.deserializeText(data)
assert message2 == message
## serialize with optionlet data =serializeText(message, oneline =false)
text format is very useful for debugging, or for cross language, human readable,, type safe, configuration files:
https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.text_format
example of text format
https://github.com/BVLC/caffe/blob/master/models/bvlc_reference_caffenet/solver.prototxt
usage
WORKAROUND
same as msoucy/dproto#71 (comment) : shell out to protoc eg:
workaround is not great, as not as efficient, and requires passing the proto file; the proper solution should involve using reflection
The text was updated successfully, but these errors were encountered: