Tag Info

New answers tagged


I agree with @BobDalgleish and @kiwiron above. Keep serialization out of the model, don't be alarmed that serialization logic of a model object is in a separate class. You can see it as a "view" (presentation) of your model, and views are usually separated from their model counterparts.


...Is this design desperately wrong? No. You can serialize circular references using JSON I don't know what's the Python-approach. But from the specification point of view I've heard that json pointer fragment might be the internet search query Wikipedia → JSON → Object references is not very clear on this subject and emphasizes the implementation ...


To avoid circular references, only a parent node/class should know about it's children. Accessing Game as the root node should allow you to gather information anywhere you need.


Serialized data is, well, data. If you break support for input files that used to work, or change the output files in ways that break external programs, that's a backwards incompatible change. If previously working input files are still supported and the changes to output files is such that it won't break external programs (or there are no external ...

Top 50 recent answers are included