Introducing SHLS: Sebis Hierarchical List Structure
Hello everyone,
I’m excited to share with you a project I’ve been working on: SHLS (Sebis Hierarchical List Structure). SHLS is a data representation format I developed to solve a problem I had to face—how to represent data in the most compact and token-efficient way possible, without sacrificing readability or structure.
What is SHLS?
SHLS is a lightweight, space-efficient data format that uses indentation to represent hierarchy. Unlike JSON or YAML, it eliminates unnecessary syntax like multiple mentioning of keys, quotation marks, brackets, or colons, making it ideal for scenarios where:
- Token efficiency is critical, such as in AI contexts.
- A clear and human-readable structure is needed for hierarchical data.
Key Features
-
Compact Representation:
- SHLS minimizes the number of tokens required to represent data by removing redundant symbols and optimizing syntax.
-
Readable and Intuitive:
- With its indentation-based hierarchy, SHLS is easy to understand and manually edit.
-
String-Only Values:
- All values in SHLS are treated as strings by default, with type conversion handled by users or in future interpreters when needed (e.g., converting “true” to a boolean or “2023-09-01” to a date).
-
Token Efficiency for Large Data Sets:
- SHLS eliminates the need to repeatedly declare key names, significantly reducing file size and tokens as the data grows.
Example
Here’s a quick example of how SHLS looks compared to traditional formats:
JSON Example
{
"Products": [{
"Name": "Smartphone A1",
"Price": 599.99,
"InStock": true
},{
"Name": "Laptop B2",
"Price": 1299.99,
"InStock": false
},{
"Name": "Desk X3",
"Price": 299.99,
"InStock": true
}]
}
SHLS Equivalent
Product
Name
Price
InStock
Smartphone A1
599.99
true
Laptop B2
1299.99
false
Desk X3
299.99
true
Github: SebisCodes/SHLS-Sebis-Hierarchical-List-Structure
What are your thoughts on it?