Im using protobuf 2.6.1 and I have a case where there are complex types such as UUID represented as two fixed64 fields, timestamps represented as longs etc which need to be printed in a more human readable way.
Im looking for extending the toString for all protobufs generically to convert the complex types to human readable types.
Is there such a way possible? If there isnt one for 2.6.1, is there any option in >= 3.0 ?
String toString(Message input)
method with some code likeif (input instanceof SpecialMessage) return doThefancyDisplay(input) else return input.toString()
to customize where you need it – ChertTextFormat.shortDebugString(msg)
instead ofmsg.toString()
– Charlacharlady