Page generated from: SET_Files_OnePage_v4.4.md
SET|Files - One-Page Protocol
Q-Set (.qset) format v4.4
SET Files: Human-and-AI readable data format
- for advanced features see the Extended SET: X-Set (.xset) format v4.4
- Website: setfiles.org
Parsing - SET files are initially parsed on NewLine (LF or CRLF)
Preamble (optional) - comments containing information about the file and its content
myconfig.set (filename of the document - strongly recommended as the first line)
The "one-page" definition of SET files
Group(s) – begin with the Group name
[USERS] - Sections of the file containing related information,
- Each Group MUST have a unique name within the file - enclosed in square brackets
[ ]
- May only contain Letters, Numbers, hyphens
-, and underscores _
- A Group may contain diverse types of information: Key|Value, Table, Delimited String
- Text Groups are used to store blocks of extensive text information (even multi-line)
- Groups end with an empty line, the next group,
[EOG] End-of-Group, or [EOF] End-of-File
Text-Group(s): a special type of Group
[{TEXT-GROUPS}]
- All contents of a Text-Group are a single entity allowing multiple lines and unusual characters
- No escaping is needed inside a Text-Group, all content is "as-is"
- Unlike other Groups, Text-Groups do not end on empty lines.
- Text Group names may be use in a Line, as a Linked Reference -
License | [{LICENSE}]
Line(s): within a group hold information in delimited arrays.
Protocol|RS232|9600|8|N|1|none
- A Line could be a single entry array. The parser might look for "line 3" of
[CONFIG] – reading the whole line, no delimiter
- A Line may be a
Key|Value pair - with just one delimiter
- A Line may be a delimited array of data like a csv - but
| pipe delimited
- A field in a line, may reference a Text Group in the same SET File
- Spaces before/after delimiters may provide readability - Q-Set assumes delimited data is trimmed - trim().
- A field within a line may itself be an array of data (nested array), by simply using the secondary delimiter (default=
!)
Comments: Any text outside of a Group is considered a comment
- Any comment immediately preceding a Group is assumed to be related to that group
Advanced Features X-Set- use a mix-and-match policy for things like SetQL, Custom Delimiters, Internationalization etc.
SET\_File\_One-Page\_v4.4 – www.setfiles.org