tgvaughan / MASTER

A versatile simulation engine for stochastic population dynamics models.
http://tgvaughan.github.io/MASTER
GNU General Public License v3.0
22 stars 8 forks source link

Clean up JSON output mechanism #18

Closed tgvaughan closed 1 year ago

tgvaughan commented 11 years ago

Part of the beauty of using JSON in the first place was the fact that libraries like Jackson allow much of the assembly of the serialized object hierarchy to be handled automatically. As things like simulation specifications have become more complicated, however, this has resulted in a less readable description of the spec. Correcting this has meant introducing @JsonIgnore annotations throughout the spec and reaction code. This is yucky, as it's mixing output formatting logic and simulation logic.

It'd be much better to get rid of all of those annotations, and glob all the output formatting stuff together in the JsonOutput class. This will also put the JSON output on the same level as other formats when we implement output classes for them.