The spec currently specifies that key-chaining can be mixed with full-object representation:
|
The 'standard' nested object syntax can be mixed with key chaining: |
|
|
|
```corn |
|
{ |
|
foo = { |
|
bar = 42 |
|
} |
|
|
|
foo.pi = 3.14 |
|
} |
|
``` |
What is not specified is whether this should be supported in reverse, ie chaining prior to the full-object.
{
value.foo = 42
value = { bar = 3.14 }
}
https://github.com/corn-config/test-suite/blob/0a493cedc8f0039bc9a0aceeb6a3c66ba0024bce/corn/key/chaining/start.pos.corn
The current (v0.10) behaviour is that foo is overwritten and lost.
{ "value": { "bar": 3.14 } }
https://github.com/corn-config/test-suite/blob/0a493cedc8f0039bc9a0aceeb6a3c66ba0024bce/json/key/chaining/start.json
Should this be the the case, or should the expected result be an object with both foo and bar?
A decision is required, and the spec needs to be updated either way.
The spec currently specifies that key-chaining can be mixed with full-object representation:
specification/spec.md
Lines 409 to 419 in b5084cb
What is not specified is whether this should be supported in reverse, ie chaining prior to the full-object.
https://github.com/corn-config/test-suite/blob/0a493cedc8f0039bc9a0aceeb6a3c66ba0024bce/corn/key/chaining/start.pos.corn
The current (v0.10) behaviour is that
foois overwritten and lost.{ "value": { "bar": 3.14 } }https://github.com/corn-config/test-suite/blob/0a493cedc8f0039bc9a0aceeb6a3c66ba0024bce/json/key/chaining/start.json
Should this be the the case, or should the expected result be an object with both
fooandbar?A decision is required, and the spec needs to be updated either way.