eea3a14a71
Previously we allowed arrays only at the "leaf" of a set of objects describing a block and its labels. This is not sufficient because it is therefore impossible to preserve the relative ordering of a sequence of blocks that have different block types or labels. The spec now allows arrays of objects to be used in place of single objects when that value is representing either an HCL body or a set of labels on a nested block. This relaxing does not apply to JSON objects interpreted as expressions or bodies interpreted in dynamic attributes mode, since there is no requirement to preserve attribute ordering or support duplicate property names in those scenarios. This new model imposes additional constraints on the underlying JSON parser used to interpret JSON HCL: it must now be able to retain the relative ordering of object keys and accept multiple definitions of the same key. This requirement is not imposed on _producers_, which are free to use the allowance for arrays of objects to force ordering and duplicate keys with JSON-producing libraries that are unable to make these distinctions. Since we are now requiring a specialized parser anyway, we also require that it be able to represent numbers at full precision, whereas before we made some allowances for implementations to not support this. |
||
---|---|---|
.. | ||
hclsyntax | ||
integrationtest | ||
json | ||
diagnostic_text_test.go | ||
diagnostic_text.go | ||
diagnostic.go | ||
didyoumean.go | ||
doc.go | ||
eval_context.go | ||
expr_list.go | ||
expr_unwrap.go | ||
merged_test.go | ||
merged.go | ||
ops.go | ||
pos_scanner_test.go | ||
pos_scanner.go | ||
pos_test.go | ||
pos.go | ||
schema.go | ||
spec.md | ||
static_expr.go | ||
structure.go | ||
traversal_for_expr_test.go | ||
traversal_for_expr.go | ||
traversal.go |