ilmoeuro / snakeyaml

Automatically exported from code.google.com/p/snakeyaml
0 stars 0 forks source link

unable to serialize a bean more than once using the same Yaml instance #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm unable to serialize a bean more than once using the same Yaml   
instance. After the first bean is serialized, subsequent beans are not   
serialized as beans, they are serialized as maps. It seems that some   
variables to determine if the object is the root object do not get   
reset after the first call. (isRoot in Representer). 
Here is a gist with my failed test case. You can probably work it into   
your existing tests easily. 
http://gist.github.com/151188 
Alan Gutierrez 

Original issue reported on code.google.com by py4fun@gmail.com on 21 Jul 2009 at 9:31

GoogleCodeExporter commented 9 years ago
The bug is fixed. Feel free to take the latest source and test it.
For your information, avoiding global tags significantly improves ability to 
exchange 
the YAML documents between different platforms and languages.

Original comment by py4fun@gmail.com on 21 Jul 2009 at 10:50

GoogleCodeExporter commented 9 years ago
Guess I wasn't quick enough.

Original comment by alan%blo...@gtempaccount.com on 21 Jul 2009 at 3:52

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by aso...@gmail.com on 6 Aug 2009 at 10:00