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 {\ttfamily \#\#\#empty\+\_\+array} in {\ttfamily yajl}.


\begin{DoxyItemize}
\item None
\end{DoxyItemize}


\begin{DoxyItemize}
\item None
\end{DoxyItemize}


\begin{DoxyItemize}
\item {\ttfamily \#\#\#empty\+\_\+array} as in {\ttfamily yajl}, problem\+: does not allow efficient access of first element
\item store length (and not last element), problem\+: needs prepending of {\ttfamily \#\+\_\+...}
\item store element after last element (C++-\/\+Style), problem\+: very unusual style
\item use value and not metadata array, problem\+: is ambiguous
\end{DoxyItemize}

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


\begin{DoxyCode}{0}
\DoxyCodeLine{myarray/\#0 = value0}
\DoxyCodeLine{myarray/\#1 = value1}
\DoxyCodeLine{myarray/\#2 = value2}
\DoxyCodeLine{myarray/\#3 = value3}
\DoxyCodeLine{myarray/\#4 = value4}
\DoxyCodeLine{myarray/\#5 = value5}
\DoxyCodeLine{[myarray]}
\DoxyCodeLine{  array = \#5}
\end{DoxyCode}



\begin{DoxyItemize}
\item Is very similar to {\ttfamily binary} metadata.
\item The key alone suffices to know if its an array
\item one can distinguish an array with keys that are called by chance \#0
\end{DoxyItemize}


\begin{DoxyItemize}
\item yajl needs to be fixed
\item metadata library needs to be adapted
\item spec plugin needs to be fixed
\end{DoxyItemize}


\begin{DoxyItemize}
\item \mbox{\hyperlink{doc_decisions_global_validation_md}{Global Validation}}
\end{DoxyItemize}

\href{https://github.com/ElektraInitiative/libelektra/issues/182}{\texttt{ https\+://github.\+com/\+Elektra\+Initiative/libelektra/issues/182}} 