Open GoogleCodeExporter opened 9 years ago
I agree. I actually want to get rid of the HashMap class altogether and
replace it
with Dictionary and OrderedObject (this is a simple class that is available in
the
Flex framework that maintains the order in which properties were added). Then
I'll
add an option in the config class that specifies which option to use when
decoding
(Dictionary where order does not matter, OrderedObject where it does).
Original comment by dwischu...@gmail.com
on 16 Oct 2009 at 4:21
i actually meant encoding ;)
i couldn't find the OrderedObject class in the flex reference - watch for
dependencies :P
Original comment by schizosfera@gmail.com
on 16 Oct 2009 at 4:52
Definitely. I'm just going to grab the class and add it to the yaml lib (as I
did
for the Base64 classes).
On the encoding side you'll have control over which classes you encode. I'll
just
need to update the encoder so that Dictionary and OrderedObject get serialized
as
plain yaml objects rather than custom actionscript objects. On the decoding
side
I'll need to add the option for maintaining order because right now everything
gets
turned into a Dictionary, which does not guarantee order (actually it's
basically
guaranteed to lose the order). So if you were to specify in the config that
order
should be maintained, the decoder would return OrderedObjects rather than
Dictionary
objects so you would be able to do a complete roundtrip without losing order.
Best,
Derek
Original comment by dwischu...@gmail.com
on 16 Oct 2009 at 5:14
any update on this issue? it's something i really need. if you don't have the
time,
i'll probably have to hack this myself in my local copy of the source.
Original comment by schizosfera@gmail.com
on 3 Nov 2009 at 2:16
Original issue reported on code.google.com by
schizosfera@gmail.com
on 16 Oct 2009 at 10:04