-
Notifications
You must be signed in to change notification settings - Fork 0
Cobble Structured Text
teeten edited this page Jul 7, 2019
·
1 revision
Cobble#
Smart Tools for Developers
Introduction#
Cobble Structured Text (Cobble STX) is a library for manipulating data stored in text files. It is an alternative to Properties, XML or JSON file formats.
Key differences with other data text formats:
- Use traditional standard ASCII non-printable characters as separators
- Can be manipulated at several "levels" of structure
Benefits
- Simple, compact syntax, but can still hold complex data structures
- Use of non-printable separators means no need to worry about escaping brackets or punctuation
- As simple as properties files, but very extensible
- Convenient to display in a terminal
Structure Levels
- Raw lines
- Lines containing tuples
- Lines organised in sections (sections can be named or not)
- Dictionary: lines containing key/value pairs
- Object collection: objects can be named or not
- Multiple object collections organised in sections (named or not)
Separators
- Lines: CR (carriage return)
- Tuples: TAB
- Objects: LF (line feed)
- Sections: FF (form feed)
Structured Text Specifications