Saving data


#1

How hard would it be to serialize this?

I’ve seen some general discussion regarding the difficulty of serializing complex data structs and things like classes… would this hold true for this as well? Would the best solution be to iterate over the collection and save as XML, or could I just do a stream out?


#2

Think about the endianess if you suggest you just save it as it is.


#3

Well, you can’t really answer that question without making a decision about how you actually want it stored. Do you want it human readable? Are either file-size or parsing speed critical to you needs?

The easiest way is usually XML, as it’s dead easy to bash structured data into a tree and write it out (same for reading it back in). If all you care about is how easy it is for you to write it out and read it in, then that’s what I’d suggest.

If you do have any specific requirements, however, you must consider them before choosing your approach.


#4

Thanks for the thoughts Haydxn. I converted everything to Value Trees and all is golden now :slight_smile: Wished I’d understood them earlier, and to anyone using nested arrays of basic data types, I can’t express enough how awesome the Value Trees have been.