PAT File Format
The PAT file format is a human-readable data format designed for simplicity and readability. PAT stands for "Plain-text Abstract Tree". The format is a minimal data format that has next to no syntax and can be created and modified as a simple text editor. View the github page here for specification details and example parsing APIs.
The reason for creating the PAT format was through necessity for configuration files for various projects. Many existing formats were considered, such as JSON, YAML, INI, and XML, but each of these had drawbacks. The common drawback of each was that the syntax was too difficult to understand for anyone who was not already familiar with the format. Each of these formats have their own learning curve, can be daunting to learn/understand the syntax, and are easy to create syntax errors or malformed data. As a result, PAT has nearly no syntax, only whitespace indentation to form a loose tree structure of which many other kinds of structures can be formed.
Comparison with other formats
Here is a comparison of some data to compared with other formats and showcases the trivial
nature of parsing PAT files.
PAT
order
id
1001
customer
name
Jane Doe
email
jane@example.com
items
item
sku
SKU123
quantity
2
price
19.99
item
sku
SKU456
quantity
1
price
5.50
shipped
false
discount code
total
45.48
created at
2026-02-13T10:15:00Z
JSON
{
"order_id": 1001,
"customer": {
"name": "Jane Doe",
"email": "jane@example.com"
},
"items": [
{
"sku": "SKU123",
"quantity": 2,
"price": 19.99
},
{
"sku": "SKU456",
"quantity": 1,
"price": 5.50
}
],
"shipped": false,
"discount_code": null,
"total": 45.48,
"created_at": "2026-02-13T10:15:00Z"
}
YAML
order_id: 1001
customer:
name: Jane Doe
email: jane@example.com
items:
- sku: SKU123
quantity: 2
price: 19.99
- sku: SKU456
quantity: 1
price: 5.50
shipped: false
discount_code: null
total: 45.48
created_at: 2026-02-13T10:15:00Z
XML
<order>
<order_id>1001</order_id>
<customer>
<name>Jane Doe</name>
<email>jane@example.com</email>
</customer>
<items>
<item>
<sku>SKU123</sku>
<quantity>2</quantity>
<price>19.99</price>
</item>
<item>
<sku>SKU456</sku>
<quantity>1</quantity>
<price>5.50</price>
</item>
</items>
<shipped>false</shipped>
<discount_code />
<total>45.48</total>
<created_at>2026-02-13T10:15:00Z</created_at>
</order>
Although YAML takes the least amount of lines, it is syntax heavy and includes data types that may not be obvious.
JSON and XML share the same amount of lines, but XML is much more verbose and does not allow keys with spaces and both still can suffer from malformed syntax.
JSON is a little clearer, but also requires special characters to denote special types such as objects and arrays.
PAT would almost be a superset of JSON and XML if indentation was a requirement for each. This is the tradeoff to exclude any special character requirements for data types. This leaves the data types to be determined by the API, as with XML, leaving only raw organized data. Because of this, the data is more flexible to handle a variety of purposes.
Check out the github page for more info and examples, and try it out.