OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

camp message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: YAML parser issues


I've been doing some experimenting with YAML parsers and I've discovered that JSON is a subset of YAML 1.2, but not a subset of YAML 1.1. If your parser does not support YAML 1.2, there will be some JSON documents that it cannot parse.

The following Java YAML parsers are listed on yaml.org:

JyYaml: This looks like a dead project (no commits for over a year).

SnakeYaml: SnakeYAML supports YAML 1.1. Issue 166 in the SnakeYAML project ("Any plan to add support for YAML 1.2 spec ?") says "I do not plan to work on the 1.2 spec (09-jan-2013). Feel free to contribute. Please be aware that 1.2 is not supported by many parsers."

YamlBeans: Supports YAML 1.0 and 1.1. If there are any plans to support YAML 1.2, they are not documented.

JYaml:Another dead project.

Long story short, there is no Java YAML parser (that I can find) that supports YAML 1.2. This means that, for Java implementations of CAMP, you'd have to use a JSON parser for the HTTP requests and responses (e.g. Jackson or GSON) and SnakeYAML for the DP (e.g. SnakeYAML or YamlBeans). This isn't the end of the world, and it may change some time in the future but, for now, we can stop talking about how "JSON is a subset of YAML". Also, if we do use YAML for the DP, we should specify the use of YAML 1.1.

~ gp


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]