Thursday, October 13, 2011

YSON is a Structured Object Notation

Here's my proposed structure.  I want to keep the quotes to a minimum.

records:
[
    !record record:
    {
      !game &001 game:
      {
        date: 'March 2, 1962',
        versus: New York
      },
      notes: Awesome!,
      number: 100,
      !player &002 player:
      {
        name: Wilt Chamberlain,
        team: Philadelphia
      },
      record: Most points single game
    },
    
    !record record:
    {
        game: *001,
        number: 59,
        player: *002,
        record: 'Most points, one half'
    }
]


object
    hash

hash
    {}
    { pairs }

pairs
    key: value
    key: value, ...

key:
    string
    &id string
    !type string
    !type &id string
    
list
    []
    [ elements ]

elements
    value
    value, elements

value
    key
    string
    number
    object
    hash
    list
    true
    false
    null

No comments:

Post a Comment