To remind folks, the YAML2 wiki is here: https://github.com/yaml/YAML2/wiki

And YAML2 is a meta project that includes:

* A YAML 2.0 syntax
 (test driven spec)
* Auxillary YAML projects
  * A schema language
  * YPATH query lang

I am motivated (as always) to keep things moving forward.

Trans, in terms of adding new directives, I am more motivated to get directives out (if possible). YAML docs have never come close to being semantically self-hosting. There have always been outside forces needed to define semantics. Put another way, any YAML document (without further context) can have any meaning. This is a subtle, yet powerful strength of YAML, even if it feels counter-intuitive at first.

I agree that the reserved chars can be removed for 2.0. Also there are a ton of other things that can be done to reduce the need for quoting:

  foo: bar: baz

can easily be made to mean {"foo": "bar: baz"}

The block form of scalars, falsely inherited the limitations needed for flow scalars. IIRC, Oren just wanted to keep the grammar smaller (even though it is massive).

A project that I have been working on is called Pegex (PEG + regex) parsing framework that works in most languages so that there can be a single grammar that supports an equivalent parser in every language. This will happen in 2014.

Find me on IRC to discuss, and add ideas to the wiki.

Ingy


On Sun, Mar 16, 2014 at 11:17 PM, Trans <transfire@gmail.com> wrote:
Taking the JSON-LD example:

{
  "@context": {
    "name": "http://xmlns.com/foaf/0.1/name",
    "homepage": {
      "@id": "http://xmlns.com/foaf/0.1/workplaceHomepage",
      "@type": "@id"
    },
    "Person": "http://xmlns.com/foaf/0.1/Person"
  },
  "@id": "http://me.markus-lanthaler.com",
  "@type": "Person",
  "name": "Markus Lanthaler",
  "homepage": "http://www.tugraz.at/"
}

I imagine the YAML would be something like:

%TAG !foaf! http://xmlns.com/foaf/0.1/
--- !foaf!Person
name: !foaf!name Markus Lanthaler
homepage: !foaf!workplaceHomepage http://www.tugraz.at/

How much sexier is that!? Note, the only thing I'm not sure about is the @id (me.markus-lanthaler.com). Maybe there is room for a new %ID directive?

In the future (though I have already long expected) we'd eventually be able to do something like:

%SCHEMA !foaf! http://xmlns.com/foaf/0.1/foaf.yes
--- !foaf!Person
name: Markus Lanthaler
homepage: http://www.tugraz.at/

The %SCHEMA directive would link to a schema document that defines how the structure of the document can determines types, plus extra tags available for use, validations and more.


trans

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Yaml-core mailing list
Yaml-core@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yaml-core