Closed GoogleCodeExporter closed 9 years ago
It is a valuable enhancement. At the moment SnakeYAML tries to stay close to
PyYAML
and emit the same document for the same input.
Original comment by aso...@gmail.com
on 27 Apr 2010 at 11:05
> At the moment SnakeYAML tries to stay close to PyYAML
> and emit the same document for the same input.
So what does that actaully mean? Are there plans to improve serialization in
the near
future? Even if PyYAML serialization would look different?
Original comment by marcel.b...@gmail.com
on 28 Apr 2010 at 9:24
- it explains why it works now in this way
- it opens a door for anyone who is going to contribute
- those who wish to implement the enhancement may raise the question in the
yaml-core
mailing list to get useful comments
- the impact of the deviation shall be evaluated. Some SnakeYAML users are
confused
when they exchange documents with another parser. For instance SnakeYAML does
not
emit "java:" for every global tag and simply puts "!!package.Class". Issue 57
clearly
shows that when users get used to see some namespace indication (in Python and
Ruby)
they expect the same in SnakeYAML.
I do not mind if SnakeYAML and PyYAML work differently but we shall understand
the
consequence. In this particular case the change will make output better, but we
may
contact PyYAML developers to make them aware that they can also make a step
forward.
It may happend that PyYAML already now is able to output the stacktrace in a
more
readable way.
Original comment by aso...@gmail.com
on 28 Apr 2010 at 7:48
I am just stepping by this issiue and I think it is preferable to have some
kind of option for being compatible to the one side (PyYAML e.g.) and another
option for having nicer output for those who don't care about compatibility.
Original comment by malte.ke...@de.equens.com
on 10 Oct 2011 at 8:17
I am afraid, I was wrong when I said that it is a compatibility issue.
We are free to change it. No worries about the possible impact. But the
following stays:
- it explains why it works now in this way
- it opens a door for anyone who is going to contribute
Feel free to look into Emitter.java (analyzeScalar(String scalar),
chooseScalarStyle()), and/or contribute test cases for the dumper.
Original comment by aso...@gmail.com
on 10 Oct 2011 at 8:59
It should work better now. Try the latest source or the SNAPSHOT.
http://code.google.com/p/snakeyaml/source/browse/src/test/java/org/yaml/snakeyam
l/representer/DumpStackTraceTest.java (testJavaStackTraceWithoutTabs())
Please be aware that tabs now require the double quoted scalar style.
Original comment by aso...@gmail.com
on 10 Oct 2011 at 4:07
The fix will be provided in version 1.10
Original comment by aso...@gmail.com
on 18 Oct 2011 at 2:29
Original issue reported on code.google.com by
lerch.jo...@gmail.com
on 27 Apr 2010 at 9:10