Current spec requires dot notation to nest properties in an object:
{object}
{object.a}
foo: foo
{object.a.b}
bar: bar
{object.a.b.c}
baz: baz
To reduce verbosity, this PR introduces implicit nesting. Objects declared with a . flag will nest inside the object's parent. Just like with nested arrays, objects must be closed with empty brackets to move up to a parent scope.
With this change, we can now simplify the above expression to the following:
{object}
{.a}
foo: foo
{.b}
bar: bar
{.c}
baz: baz
Description
Current spec requires dot notation to nest properties in an object:
To reduce verbosity, this PR introduces implicit nesting. Objects declared with a
.
flag will nest inside the object's parent. Just like with nested arrays, objects must be closed with empty brackets to move up to a parent scope.With this change, we can now simplify the above expression to the following:
Preview
playground
Unit Tests
https://github.com/newsdev/archieml.org/pull/42/files