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