Export to GitHub

snakeyaml - issue #8

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


Posted on Jul 21, 2009 by Massive Rhino

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

Comment #1

Posted on Jul 21, 2009 by Massive Rhino

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.

Comment #2

Posted on Jul 21, 2009 by Happy Bear

Guess I wasn't quick enough.

Attachments

Comment #3

Posted on Aug 6, 2009 by Grumpy Horse

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-Defect Priority-Medium Milestone-Release1.4