Data
Posted: Wed Apr 22, 2020 1:49 pm
Been playing around with some data formats for text files; I am looking for something that I won't use a library on, simple enough to code (don't want the make the syntax parser a project in itself), yet easy enough to understand for the user.
Been toying with this concept:
{section name: data}
that is the highest level contract. So you can have a file with a series of those. Examine data for a moment:
data charaterstics:
Multiple lines, and of course entries
Can nest sections in it.
so one can this:
Now, clearly one can have comments. I plan on single line comments initially, with a simple "//" being a comment.
The only other thing I am working on is how to do array type values. Say I want this:
And of course, how to do line continuations. probably the "\", but not sure
Been toying with this concept:
{section name: data}
that is the highest level contract. So you can have a file with a series of those. Examine data for a moment:
data charaterstics:
Multiple lines, and of course entries
Can nest sections in it.
so one can this:
Code: Select all
{top section:
{subsection:
key = value
key = value
}
}
Now, clearly one can have comments. I plan on single line comments initially, with a simple "//" being a comment.
The only other thing I am working on is how to do array type values. Say I want this:
Code: Select all
{shortlist:
values = (name = value, ip = value, port = value), (name = value1, ip = value1, port = value1)
}