Both Fuel and STON deal correctly with circular references and structure sharing. However, and this is an important difference, since FUEL is saving everything it sees (everything your objects point to), it often saves a lot (way more than you expect). STON (and JSON, XML, ..) are much less powerful, they require you to carefully think about and design the domain model objects that you want to serialise/persistent (i.e. make sure they don't point to system stuff, or at least skip these). The result will be much cleaner and smaller output.
On 30 Nov 2015, at 12:41, Dimitris Chloupis <kilon.alios@gmail.com> wrote:
I have a class A that has an instance variable the references an instance of Class B , but also Class B has an instance variable the references an instance of Class A. Basically its a GUI that references its model and the same model referencing the same instance of GUI.
How Fuel deals with such scenario because I saw that it created an output of 1.5 mbs for several instances of my model class ? Is there any danger of having such circular references or it does not matter because afterall they are just pointers ?