During my implementation on a protocol buffer application, I tried to work with the text pbtxt files to ease up my programming. The idea was to switch to the pb binary format afterward, once I had a clearer understanding of the API. (I am working in C++)
I made my application working by importing the file with TextFormat::Parse
. (The content of the file came from TextFormat::Print
). I then generated the corresponding binary file, that I tried to import with myMessageVariable.ParsefromCodedStream
(file not compressed). But I notice that only a very small part of the message is imported. The myMessageVariable.IsInitialized
returns true, thus I guess that the library "thinks" that it has completely imported the file.
So my question: is there something different in the way the file are imported that could make the import "half-fail"? (Besides the obvious reason that one is binary and the other one is in text?) And what can we do against it?