-
|
Not having internalized the data model of KDL yet, I struggled to see how to encode a flat set of key-value pairs. Given this example in INI File syntax: answer=42
author="Douglas Adams"
work="The Hitchhiker's Guide to the Galaxy"The KDL approach could be either answer 42
author "Douglas Adams"
work "The Hitchhiker's Guide to the Galaxy"or - answer=42 author="Douglas Adams" work="The Hitchhiker's Guide to the Galaxy"The latter looks more familiar for readers of other data structuring languages but it is more difficult to edit (linebreak) and requires a root node identifier (here: There should be a recommendation that also includes lists of flat key-value pairs (e.g. rows from a SQL database or from a CSV file with header), maybe KViK (key-values in KDL). How about recommending these to ways (also mixable): - {
author "Douglas Adams"
title "The Hitchhiker's Guide to the Galaxy"
}
- {
author "Ursula K. Le Guin"
title "A Wizard of Earthsea"
}- author="Douglas Adams" title="The Hitchhiker's Guide to the Galaxy"
- author="Ursula K. Le Guin" title="A Wizard of Earthsea"So each node must have node name Encoding INI Files is straightforward if you allow other node names in addition to I'm sure such a limited set of KDL, compatible with INI files and (rows of) key-value pairs would be useful. Tabular data without header is more difficult but maybe not needed to be specified anyway. Maybe like this: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
answer 42
author "Douglas Adams"
work "The Hitchhiker's Guide to the Galaxy"This is definitely how I would encode it myself. Properties aren't meant for arbitrary amounts of metadata, but more for limited "metadata" for a node itself. So, a small list of flags, etc. If you want a lot of things, then children is usually the way to go for sure. |
Beta Was this translation helpful? Give feedback.
This is definitely how I would encode it myself. Properties aren't meant for arbitrary amounts of metadata, but more for limited "metadata" for a node itself. So, a small list of flags, etc. If you want a lot of things, then children is usually the way to go for sure.