layout | title | permalink | nav_order |
---|---|---|---|
page |
Maps |
/maps/ |
4 |
{% include ace.html %}
Maps are simple key/value pair structures, they translate to JSON Objects.
introduction = { "greeting": "hello", "subject": "world" }
When translated to JSON, both Blocks
and Maps
become plain objects, they however differ in the following ways:
- designed as a structural construct
- support @directives at their root
- cannot be piped
- tolerant syntax (commas are optional)
block {
@directive
key = "value"
key2 = "value2"
}
- designed as a value
- strict syntax (mandatory commas, keys are strings)
- do not support @directives at their root
- can be piped
map = {
"key": "value",
"key2": "value2"
}