In this post: Google protocol buffers compare, I see a several ways to compare protobuf messages in C++.
I tried to use msg.DebugString()
, SerializeToString()
and MessageDifferencer::Equal()
for my payload comparison. And these three methods give different result:
DebugString
shows two messages equal, while the other two shows unequal.
Since the messages is too long(>2000bytes), and multiple layers recursion, it's not really straightforward to see the difference.
Does someone know what's the difference of these methods, and which is the best to pick?