Annotations to aid YAML parsing

783 views
Skip to first unread message

Venkat K

unread,
Sep 11, 2013, 5:47:25 PM9/11/13
to snakeya...@googlegroups.com
Hi All,

I have just started to use SnakeYAML and I really like it. There is a loadAs method in the Yaml class for which I can pass a Java class to load the YAML with. I am wondering if I can use annotations to aid the parsing, much like the @JsonProperty and such tag we have in Jackson library for JSON. I saw the blog http://tux2323.blogspot.com/2010/03/proposal-snakeyaml-annotation-yaml.html that talks about such a proposal for Snake YAML. The blog posting seems to be in 2010 and I am wondering if this has been implemented. I am using the latest stable version of Snake YAML 1.13 and I do not see any such provision. Please help.

Thanks,

Venk

Venkat K

unread,
Sep 12, 2013, 11:38:43 AM9/12/13
to snakeya...@googlegroups.com
I am wondering anyone had an opportunity to look at this.

Thanks,

Venk

Andrey

unread,
Sep 12, 2013, 11:44:36 AM9/12/13
to snakeya...@googlegroups.com
Hi Venk,
we do not plan to implement annotations.

If you wish to implement it yourself - feel free to try. If you can manage to create an API which is rather small and reliable, we can include it into the package.

Cheers,
Andrey

Venkat K

unread,
Sep 12, 2013, 12:16:24 PM9/12/13
to snakeya...@googlegroups.com
Thanks Andery for the information. Will definitely try and add, and if I do, will share it with you all.
Reply all
Reply to author
Forward
0 new messages