Hi List,

given a set of defined serialization operators it is possible to
serialize objects one at a time:

    outfile << cxxtools::Json(Object("Hello", 42));
    outfile << cxxtools::Json(Object("World", -17));
    ...


But repeated calls to deserialize() seem to always process all of the file:

    cxxtools::JsonDeserializer deserializer(infile);

    Object o;
    deserializer.deserialize(o);    // o contains "Hello" and 42,
infile.seekg() is at EOF, even for big files with small objects

    Object b;
    deserializer.deserialize(b);    // b contains "Hello" and 42


Is there a way to read the objects back in one at a time, instead of
using a container that will become very big in memory ?
I could of course pre-parse the file and hand only 1 objects worth of
chars over to the deserializer, but that seems rather inefficient.

Thanks in advance,
Michael

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to