On Fri, Oct 5, 2012 at 11:37 AM, Andrey Somov <
py4...@gmail.com> wrote:
> 1)
> please be aware that what you do is inconsistent. It may work for one valid
> YAML document, but fail for another valid document.
> You assume that a part of a YAML document is a valid YAML document.
> Unfortunately this is not the case because of anchors/ aliases and
> directives.
Anchors, aliases, and directives are not present in the representation
graph created by the composer, so they should not pose any problem as
long as I don't modify the Composer. I've tested cases where the Node
I pass to the constructor contains aliases to anchors outside that
subtree, and SnakeYAML appears to handle it correctly. In the test
case I posted, if you change the developer line to read "developer: {
name: *name, language: *language }" with &name and &language anchors
defined previously in the document, the test still succeeds.
> 2) I do not see your use case as a reason to change SnakeYAML. But I do not
> mind to change SnakeYAML if the community thinks, that it gives more
> flexibility for the end users.
> I hope other developers can review this request and give their opinion.
Our strategy of using a single YAML file to configure all the
subsystems of our product may be unusual. Our previous strategy of
using a different config file for each subsystem was simpler to
program, but users and ops hated wrangling multiple files. Simplicity
for the people who manage and modify configs is paramount; otherwise I
could require them to tag entries with type information or separate
the file into different documents using '---'. So it's possible my
needs are unique. In any case, my needs are well served by current
SnakeYAML with very minor modifications, possibly no modifications at
all since I believe I can subvert access control via reflection.
Thank you for your responses!
- David
>
> Cheers,
>
> Andrey
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "SnakeYAML" group.
> To post to this group, send email to
snakeya...@googlegroups.com.
> To unsubscribe from this group, send email to
>
snakeyaml-cor...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/snakeyaml-core?hl=en.