Skip to content

Commit b47cdb1

Browse files
committed
Update ASON 2.0 syntax examples and descriptions
1 parent 32b750a commit b47cdb1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

nodejs-compressor/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ LLM tokens cost money. Standard JSON is verbose and token-expensive. **ASON 2.0*
4141

4242
### After (ASON 2.0 - 23 tokens, **61% reduction**)
4343
```
44-
@users [2]{id,name,email}
44+
users:[2]{id,name,email}
4545
1|Alice|alice@example.com
4646
2|Bob|bob@example.com
4747
```
4848

4949
### What's New in ASON 2.0?
5050

51-
-**Sections** (`@section`) - Organize related data, save tokens on deep structures
52-
-**Tabular Arrays** (`[N]{fields}`) - CSV-like format for uniform data
51+
-**Sections** (`@section`) - Organize related objects, save tokens on deep structures
52+
-**Tabular Arrays** (`key:[N]{fields}`) - CSV-like format for uniform arrays
5353
-**Semantic References** (`$email`, `&address`) - Human-readable variable names
5454
-**Pipe Delimiter** - More token-efficient than commas
5555
-**Lexer-Parser Architecture** - Robust parsing with proper AST
@@ -77,7 +77,7 @@ const data = {
7777
const ason = compressor.compress(data);
7878
console.log(ason);
7979
// Output:
80-
// @users [2]{id,name,email}
80+
// users:[2]{id,name,email}
8181
// 1|Alice|alice@ex.com
8282
// 2|Bob|bob@ex.com
8383

@@ -91,8 +91,8 @@ const original = compressor.decompress(ason);
9191
-**20-60% Token Reduction** - Saves money on LLM API calls
9292
-**100% Lossless** - Perfect round-trip fidelity
9393
-**Fully Automatic** - Zero configuration, detects patterns automatically
94-
-**Sections** - Organize data with `@section` syntax
95-
-**Tabular Arrays** - CSV-like format `[N]{fields}` for uniform data
94+
-**Sections** - Organize objects with `@section` syntax
95+
-**Tabular Arrays** - CSV-like format `key:[N]{fields}` for uniform arrays
9696
-**Semantic References** - `$var`, `&obj`, `#N` for deduplication
9797
-**TypeScript Support** - Full `.d.ts` type definitions
9898
-**ESM + CJS** - Works in browser and Node.js
@@ -268,7 +268,7 @@ CSV-like format for uniform data:
268268
}
269269

270270
// ASON 2.0
271-
@items [2]{id,name,price}
271+
items:[2]{id,name,price}
272272
1|Laptop|999
273273
2|Mouse|29
274274
```

0 commit comments

Comments
 (0)