wiki:SchemaProposalYGNI

Version 4 (modified by jstroud@…, 3 years ago) (diff)

--

YGNI - YAML's Gonna Need It

A YAML Schema Language Proposal by Ingy

An Example Schema

This is just some stream of conciousness stuff. Not done yet...

---
top:
  path: //
  tag:  '!<tag:ingy.net,2004:person>
  kind: map
  keys:
    - key: name
      value: '!!str'
      required: y
    - key: age
      value: '!!int'
      required: y
    - key: nationality
      value: '!nationality'


nationality:
  type: enum
  values: [black, white, yellow, red, green]

Related Schema

json has nearly a  fully developed schema that has been in the works for about 5 years. Considering the similarities and overlap between the two formats, it might be fairly straightforward to adapt the json schema for yaml.