Space: A whitespace alternative to JSON
github.com
github.com
myKey this is a multiline string
and the indent on this line indicates that.
It can even be 3 lines long :)
someOtherKey and now this is a separate key/value pair.
Like URLs, new lines and spaces are not allowed in keys.JSON is really popular. However, the number of people in the world who can read and write JSON is say, between 2-20 million. So a very small percentage of the people who could benefit from reading and writing structured data are currently doing so. Our thought with this is that perhaps if we can get enough adoption and developers involved over the next year or two we could enable a lot more people to collaborate on the web.
nice thought anyway.
So Space objects are both hash tables and arrays. For example say you had a variable named account with the space value:
charges
coffee $2.12
soda $1.21
cupcake $2.50
You could access the individual elements of this object like you would a hash table: account.get('charges soda')
// Returns $1.21
Or like an array: account.get('charges').get(1)
// Returns $1.21