Its list handling seems broken? tojson(fromjson(x)) !== x.
Paste { "name": "John", "age": "29", "foo": [1,2,3] } into the JSON side, and click in the left and move the cursor to force it to update and see what happens (I see it drop the first two list items).
Correct. We can turn all JSON to Space easily, but there's no canonical way to turn all Space into JSON (although you can do it easily for a particular use case).
Unlike JSON, in Space order is important and you can have duplicate properties. So in JSON you can't do this:
```
{
'h1' : 'hello world',
'h1' : 'this is a test',
}
```
It can't handle lists. A spaces object is a JS object whose keys contain no newlines or spaces, whose string values contain no newlines, and whose non-string values are spaces objects (definitely not null/boolean/number/array).
Space is great for building DSLs on top of. You often want to have additional types that your domain specific code recognizes. For example, your example could also be written in a DSL that is also valid space:
```
test [1,2,3]
```
Space is best for cases where you have small to medium sized objects that are often viewed/edited by humans, such as APIs, config files, schemas, or database objects.
I don't get it, either. I guess it's supposed to be Space:JSON::CoffeeScript:Javascript? But it seems less useful: in their example, the user clearly wanted to create an array of colors. What they got instead was a map with colors as keys and empty objects as values.
Here are some examples of space in action:
- http://sender.nudgepad.com/demo.html
- http://nudgepress.com/
It is very useful. Happy to answer questions about it.