Closed GoogleCodeExporter closed 9 years ago
Can you please modify the attached test case that it works/fails as you expect ?
(please note that the etalon and parsed string are identical at the end)
Original comment by aso...@gmail.com
on 15 Feb 2010 at 6:28
Attachments:
Making a yaml.dump and a yaml.load directly afterwards I could not reproduce
the error. It seems I am missing
something but I get a wrong representation when I use e.g. the string
"<tag>content string</tag>\n<anothertag>other content</anothertag>\n
\n<i>new</i>\n"
which gets dumped to
--- "<tag>content\
\ string</tag>\n\
<anothertag>other\
\ content</anothertag>\n\
\ \n<i>new</i>\n"
using
DumperOptions yamlOptions = new DumperOptions();
yamlOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.AUTO);
yamlOptions.setDefaultScalarStyle(ScalarStyle.DOUBLE_QUOTED);
yamlOptions.setExplicitStart(true);
yamlOptions.setWidth(10);
When I load this dumped string in Perl using YAML::Syck I get the following
result:
<tag>content\ string</tag>
<anothertag>other\ content</anothertag>
\
<i>new</i>
you can see there are three '\' characters which shouldn't be there.
Original comment by johann.W...@nureg.de
on 18 Feb 2010 at 4:10
[deleted comment]
It is a bug in Perl.
Try to change the output in a way that YAML::Syck can understand it.
Original comment by py4fun@gmail.com
on 18 Feb 2010 at 6:26
You are right. I tried the loading with a different Perl module and this time
the output was correct.
So this bug report can be closed.
Original comment by johann.W...@nureg.de
on 18 Feb 2010 at 11:34
Original comment by aso...@gmail.com
on 19 Feb 2010 at 8:10
Original issue reported on code.google.com by
johann.W...@nureg.de
on 15 Feb 2010 at 10:38