Re: minimal YAML recommendations?

Oren Ben-Kiki <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <CADJiDhs=80DpQGrh42PoiENv4-acT=jc=prWOqGMCd=bda9Gnw@mail.gmail.com>
JSON is a subset of YAML so a "JSON to YAML converter" is just "cp".

There are two big additions to JSON in YAML: (1) Block formatting, and (2)
Tags & references for controlling de-serialization.

So there are several potential growth paths from JSON to YAML.

You could use a JSON format + the minimal additions for the full YAMLdata
model (e.g. { "foo": !bar "baz" }). This would be easy to parse since there
would be no block formatting, and you'd get YAML's additional
de-serialization features. There doesn't seem to be much call for that...

Or, you could envision keeping the JSON data model and just adding YAML
block formatting for greater human readability (not easy to parse as humans
are quirky). You could argue that this is what most YAML files do in
practice.

Both of these would be YAML-compatible subsets between JSON and YAML. You
could feed them to any YAML parser today.

Or, you could embed the additional YAML data model into the JSON data model
e.g. { "tag": "...", "anchor" = "...", "=": { ... the clean JSON object }
}, { "reference": "..." }, etc.). This would be neither YAML nor JSON
(well, it would parse in both, but the data model would require additional
processing).

I don't think anyone would be comfortable with blessing any one of these
very different approaches as "the one true way".

On Thu, Jan 29, 2015 at 10:18 AM, mofo syne <[email protected]> wrote:

> There was a discussion on a stripped down YAML, and I think previously the
> consensus was that there is no need for a separate standard for "minimal
> YAML".
>
> Rather what was suggested is to simply make a document that extends the
> current YAML, by suggestion what can be included or omitted from the
> standard. ( At the very minimum, it should allow for conversion of JSON to
> a valid yaml file).
>
> Has there been any documents released lately regarding this? I haven't
> noticed any from the official http://www.yaml.org/ site. And the projects
> links from that site is still all "full version of yaml" type.
>
> I see a few people trying to create a stripped down YAML, but until there
> is an official "one way to write a minimal JSON to/from YAML parser", it
> would be all over the place. At least for those who don't need the extra
> feature of yaml.
>
> ,
>
> mofosyne
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Yaml-core mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/yaml-core
>
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/

_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.