Re:Space: A whitespace alternative to JSON
by malandrew on Wednesday April 17, 2013 @06:29AM
(#5563653)
Isn't this counter to the original purpose of JSON: serialization. Without braces and quotes, or similar syntax, you can't minify this for transfer over a low bandwidth, high latency connection.
Re:Space: A whitespace alternative to JSON
by breck on Wednesday April 17, 2013 @12:10PM
(#5565265)
Spaces are not a problem in values and need no escape. To escape a newline in a value, just indent it appropriately. For example:
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.
Re:Space: A whitespace alternative to JSON
by breck on Tuesday April 16, 2013 @10:28PM
(#5562284)
Great question. The simpler syntax reduces the number of rules to remember and shrinks the possible space for bugs. In back of the envelop user testing with non-programmers we've found people can pick up Space significantly faster than JSON.
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.
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:
You could access the individual elements of this object like you would a hash table: Or like an array: