@toon-format/spec 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# TOON Format Specification
|
|
2
2
|
|
|
3
3
|
[](./SPEC.md)
|
|
4
|
+
[](./tests/fixtures/)
|
|
4
5
|
[](./LICENSE)
|
|
5
6
|
|
|
6
7
|
This repository contains the official specification for **Token-Oriented Object Notation (TOON)**, a compact, human-readable serialization format designed for passing structured data to Large Language Models with significantly reduced token usage.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toon-format/spec",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.3",
|
|
5
5
|
"packageManager": "pnpm@10.19.0",
|
|
6
6
|
"description": "Official specification for Token-Oriented Object Notation (TOON)",
|
|
7
7
|
"author": "Johann Schopplich <hello@johannschopplich.com>",
|
|
@@ -15,7 +15,34 @@
|
|
|
15
15
|
"specSection": "7"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"name": "parses
|
|
18
|
+
"name": "parses list arrays with empty items",
|
|
19
|
+
"input": "items[3]:\n - first\n - second\n -",
|
|
20
|
+
"expected": {
|
|
21
|
+
"items": ["first", "second", {}]
|
|
22
|
+
},
|
|
23
|
+
"specSection": "7.3"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "parses list arrays with deeply nested objects",
|
|
27
|
+
"input": "items[2]:\n - properties:\n state:\n type: string\n - id: 2",
|
|
28
|
+
"expected": {
|
|
29
|
+
"items": [
|
|
30
|
+
{
|
|
31
|
+
"properties": {
|
|
32
|
+
"state": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": 2
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"specSection": "10"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "parses list arrays containing objects with nested properties",
|
|
19
46
|
"input": "items[1]:\n - id: 1\n nested:\n x: 1",
|
|
20
47
|
"expected": {
|
|
21
48
|
"items": [
|
|
@@ -91,6 +91,14 @@
|
|
|
91
91
|
},
|
|
92
92
|
"specSection": "7.1"
|
|
93
93
|
},
|
|
94
|
+
{
|
|
95
|
+
"name": "parses quoted key containing brackets with inline array",
|
|
96
|
+
"input": "\"key[test]\"[3]: 1,2,3",
|
|
97
|
+
"expected": {
|
|
98
|
+
"key[test]": [1, 2, 3]
|
|
99
|
+
},
|
|
100
|
+
"specSection": "7.1"
|
|
101
|
+
},
|
|
94
102
|
{
|
|
95
103
|
"name": "parses quoted key with empty array",
|
|
96
104
|
"input": "\"x-custom\"[0]:",
|