4 ms·
{ "[actual-filename-string]" } ...isn't valid JSON. As for going up the metatower, my personal take on this would be to strive for brevity. That is, what's the
by Xophmeister 7y ago
{ "[actual-filename-string]" }
...isn't valid JSON. As for going up the metatower, my personal take on this would be to strive for brevity. That is, what's the least structure we can get away with to unambiguously serialise what is needed? In most(?) cases, this is probably best:
{ "filename": "whatever", "foo": "bar", "etc": "etc" }
However, maybe there are instances where:
[
{ "attribute": "filename", "value": "whatever" },
{ "attribute": "foo", "value": "bar" },
{ "attribute": "etc", "value": "etc" }
]
...is more appropriate. If, for example, you need to encode a flexible schema, rather than a fixed one.
- swiley 7y agoIf brevity is what you want then what’s wrong with the default field record ls output? It’s even a regular language!