Open GoogleCodeExporter opened 8 years ago
Well, the spec references and proposals (for DumperOption) are all about
serialization, while the example is about DE-serialization.
Let us clearly split it to avoid confusion.
Can you please provide some complete Java code which you expect to work ?
(I cannot think about a data structure in Java with non-unique keys)
Please consider the following:
- how other parsers (non Java) behave
- what spec 1.2 says in this case (it is more relaxed, because of JSON
compatibility)
- if you start a conversation in the main YAML list and get a consensus there -
it would be a perfect solution.
Original comment by py4fun@gmail.com
on 22 Sep 2014 at 8:51
Thanks for your comments. I agree that DumperOption is not the best place for
this function.
Also, I couldn't see how to register this item as an improvement vs. bug.
I will open up a thread on the main YAML list, and I've started on some JAVA
code.
Original comment by MarkL...@gmail.com
on 22 Sep 2014 at 1:20
For your information, there is this issue in the Spring Boot project that seems
related: https://github.com/spring-projects/spring-boot/issues/1683
Original comment by stephane...@gmail.com
on 14 Oct 2014 at 1:34
I am one of the Spring Boot leads. I don't think Spring Boot users are
interested in dumper options. We have a perfectly good workaround (a custom
Constructor), so no need to make changes if you don't want to, but it does seem
strange to me that SnakeYAML would silently bind to a Map and swallow the
duplicate keys with not even a warning (we prefer an exception since if the
user is binding to a Map, the duplicate keys are probably an error).
Original comment by david.s...@googlemail.com
on 16 Oct 2014 at 10:32
I agree completely - my original proposal was not the best approach. The custom
Constructor is a much better idea.
Operationally, should I close the original item (#199) and open a new item? I
couldn't see how to revise the original proposal. Sorry about my unfamiliarity
with the tracking website functions.
Original comment by MarkL...@gmail.com
on 16 Oct 2014 at 6:16
Please check the change:
https://code.google.com/p/snakeyaml/source/detail?r=58ea501dd9599d5d527664771d9f
080cfe878f9b
This is backwards incompatible.
Let us see how we can make it configurable.
Original comment by py4fun@gmail.com
on 4 Feb 2015 at 9:36
Original issue reported on code.google.com by
MarkL...@gmail.com
on 22 Sep 2014 at 1:03