Elektra  0.8.19
Arrays

Issue

Currently it is inefficient to detect the length of an array and it is impossible to know if an key (without subkeys) should be an array or not.

For the latter problem different workarounds exist, such as ###empty_array in yajl.

Constraints

Assumptions

Considered Alternatives

Decision

Store length in metadata array of key, or keep empty if empty array. For example (ni syntax, sections used for metadata):

``` myarray/#0 = value0 myarray/#1 = value1 myarray/#2 = value2 myarray/#3 = value3 myarray/#4 = value4 myarray/#5 = value5 [myarray] array = #5 ```

Argument

Implications

Related decisions

Notes

https://github.com/ElektraInitiative/libelektra/issues/182