JavaScript Simplified Object Notation - A human-friendly syntax that transpiles to JSON, YAML, TOML, and TypeScript.
- What is JSSON?
- Why JSSON?
- Quick Start
- Features
- Multi-Format Output
- Examples
- Installation
- Documentation
- LLM-Optimized Documentation
- Real-World Use Cases
- VS Code Extension
- Contributing
- License
JSSON is a transpiler that converts human-friendly syntax into standard configuration formats. It eliminates the pain points of writing JSON manually while maintaining full compatibility.
JSSON Input:
users [
template { name, age }
JoΓ£o, 19
Maria, 25
Pedro, 30
]
ports = 8080..8085
JSON Output:
{
"users": [
{ "name": "JoΓ£o", "age": 19 },
{ "name": "Maria", "age": 25 },
{ "name": "Pedro", "age": 30 }
],
"ports": [8080, 8081, 8082, 8083, 8084, 8085]
}| Pain Point | JSSON Solution |
|---|---|
| π€ Quotes everywhere | β No quotes needed for keys |
| π Trailing comma errors | β No commas required |
| π Repetitive data | β Templates for arrays |
| π’ Manual ranges | β
Built-in range syntax (1..100) |
| π Scattered configs | β File includes |
| π Copy-paste errors | β Map transformations and variables |
# Download from releases
# Or build from source
go build -o jsson ./cmd/jsson// config.jsson
app {
name = "My App"
version = "1.0.0"
ports = 3000..3005
}
jsson -i config.jsson > config.jsonOutput:
{
"app": {
"name": "My App",
"version": "1.0.0",
"ports": [3000, 3001, 3002, 3003, 3004, 3005]
}
}Declare reusable variables with := to avoid repetition and keep your configs DRY:
// Declare once, use everywhere
api_url := "https://api.example.com"
timeout := 5000
max_retries := 3
production {
url = api_url + "/v1"
timeout = timeout
retries = max_retries
}
staging {
url = api_url + "/dev"
timeout = timeout * 2
retries = max_retries
}
Variables support:
- Global scope: Declared at root level, accessible everywhere
- Local scope: Declared inside objects, scoped to that object
- Shadowing: Inner scopes can override outer variables
- Not in output: Variables are internal-only, never appear in final JSON
Map transformations can now be nested inside other maps for multi-level data pipelines:
// Generate a multiplication table
table = (1..5 map (row) = (1..5 map (col) = row * col))
// Product variants (all combinations)
products = (["S", "M", "L"] map (size) = (
["Red", "Blue"] map (color) = {
sku = size + "-" + color
price = 29.99
}
))
Full support for multi-dimensional arrays:
// 2D Matrix
matrix = [
[ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ]
]
// Generated with nested maps
grid = (0..2 map (y) = (0..2 map (x) = [x, y]))
Ranges now work everywhere expressions are allowed:
// Inside arrays
numbers = [ 1..5, 10..15, 20..25 ]
// Inside map arguments
data = (0..999 map (x) = { id = x, value = x * 2 })
// Large-scale generation
bigData = 0..9999 // 10,000 items!
Division (/) and modulo (%) now work everywhere:
hash = "uid-" + (user.id * 91 % 17)
halves = (0..10 map (x) = x / 2)
- No quotes for keys
- No trailing commas
- Comments with
// - Bare identifiers
Generate arrays from structured data:
products [
template { id, name, price }
1, "Laptop", 999.99
2, "Mouse", 29.99
3, "Keyboard", 79.99
]
Generate sequences effortlessly:
numbers = 1..100
ports = 8080..8090
Transform data with map clauses:
users [
template { name, age }
map (u) = {
name = u.name
age = u.age
isAdult = u.age >= 18
category = u.age >= 18 ? "adult" : "minor"
}
JoΓ£o, 25
Maria, 16
]
Modularize your configurations:
include "database.jsson"
include "api-config.jsson"
- Operators:
+,-,*,/,% - Comparisons:
==,!=,>,<,>=,<= - Ternary:
condition ? true : false
Handle large datasets efficiently with streaming mode:
# Enable streaming for large data
jsson -i large-data.jsson --stream > output.json
# Auto-enable for ranges > 10,000 items (default)
jsson -i data.jsson > output.json
# Custom threshold
jsson -i data.jsson --stream-threshold 5000 > output.jsonBenefits:
- Memory efficient: Reduces memory usage from ~500MB to <50MB for 100k items
- Scalable: Process millions of items without OOM errors
- Automatic: Smart threshold detection enables streaming when needed
Perfect for:
- Generating 100k+ records
- Large matrix/grid data (100x100+)
- Database seeding with millions of rows
- Memory-constrained environments
Full support for nested structures:
config {
methods = [ GET, POST, PUT ]
nested {
items = [ 1, 2, 3 ]
}
// Nested arrays (v0.0.5+)
matrix = [
[ 1, 2 ],
[ 3, 4 ]
]
}
JSSON isn't just for JSON anymore. Transpile to your favorite format:
jsson -i config.jsson -f yaml > config.yamljsson -i config.jsson -f toml > config.tomlGenerates as const objects and type definitions!
jsson -i config.jsson -f ts > config.tsGenerate 2D matrices using nested maps:
// Multiplication table
table = (1..10 map (row) = (1..10 map (col) = row * col))
// Coordinate grid with objects
grid = (0..99 map (y) = (0..99 map (x) = {
x = x
y = y
id = y * 100 + x
}))
// Generates 10,000 coordinates!
Generate all combinations for e-commerce:
products = (["S", "M", "L", "XL"] map (size) = (
["Black", "White", "Navy", "Gray"] map (color) = {
sku = size + "-" + color
size = size
color = color
price = 29.99
inStock = true
}
))
// Generates 16 product variants automatically!
Generate thousands of records effortlessly:
testUsers = (0..9999 map (id) = {
id = id
username = "user_" + id
email = "user" + id + "@test.com"
active = (id % 2) == 0
tier = id < 1000 ? "bronze" : id < 5000 ? "silver" : "gold"
})
// 10,000 users generated!
Generate millions of coordinate records:
cityGrid [
template { id, zone }
map (point) = {
id = "grid-" + point.id
lat = -23.5505 + (point.id / 10) * 0.01
lon = -46.6333 + (point.id % 10) * 0.01
zone = point.zone
}
0..9999, "urban" // 10,000 points!
]
Multi-environment infrastructure:
deployments [
template { app, env, replicas }
map (d) = {
name = d.app + "-" + d.env
replicas = d.replicas
image = "registry/" + d.app + ":" + (d.env == "prod" ? "stable" : "latest")
resources = d.env == "prod" ? "high" : "low"
}
"api", "prod", 5
"api", "staging", 2
"web", "prod", 3
]
More examples in examples/real-world/
From Source:
git clone https://github.com/carlosedujs/jsson
cd jsson
go build -o jsson ./cmd/jssonUsage:
jsson -i input.jsson > output.json # JSON (default)
jsson -i input.jsson -f yaml > out.yaml # YAML
jsson -i input.jsson -f ts > out.ts # TypeScriptInstall from the VS Code Marketplace:
- Open VS Code
- Press
Ctrl+P(orCmd+Pon Mac) - Type:
ext install carlosedujs.jsson - Press Enter
Or search for "JSSON" in the Extensions view (Ctrl+Shift+X).
Full documentation available at: JSSON Docs
JSSON provides LLM-friendly documentation at /llms.txt/ for AI assistants and language models:
- Clean Text Format: All documentation converted to
.txtwithout HTML/JSX noise - Structured Index: Easy navigation with organized sections
- Auto-Generated: Updated on every build from source
.mdxfiles
Access:
- Index: https://docs.jssonlang.tech/llms.txt/index.txt
- Example: https://docs.jssonlang.tech/llms.txt/guides/getting-started.txt
Perfect for:
- AI coding assistants (Copilot, Cursor, Claude)
- LLM context injection
- Automated documentation queries
- RAG (Retrieval-Augmented Generation) systems
JSSON excels at:
- π’ Matrix Generation: 2D/3D grids, multiplication tables, coordinate systems (v0.0.5)
- ποΈ E-commerce: Product variants, SKU generation, pricing matrices (v0.0.5)
- π§ͺ Test Data: Generate thousands of realistic records with patterns (v0.0.5)
- πΊοΈ Geographic Data: Generate millions of coordinate records efficiently
- βΈοΈ Infrastructure as Code: Kubernetes configs, Terraform, CloudFormation
- π API Configurations: Gateway routes, rate limiting, CORS policies
- π Internationalization: Multi-language translation files
- π Feature Flags: Environment-specific configuration management
- πΎ Database Seeding: Generate realistic test data with relationships
See real examples in examples/real-world/:
- Geographic coordinates (10,000+ points)
- Kubernetes deployments (multi-environment)
- API gateway configuration
- i18n translations (4 languages)
- Feature flags (prod/staging/dev)
- Database seed data (200+ records)
The JSSON VS Code extension provides:
- β¨ Syntax Highlighting for all JSSON keywords
- π― Auto-closing brackets and braces
- π¬ Comment support (
//) - π¨ Color coding for strings, numbers, operators
- π Language configuration for better editing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MIT License - see the LICENSE file for details.
- Documentation: https://docs.jssonlang.tech/
- VS Code Extension: https://marketplace.visualstudio.com/items?itemName=carlosedujs.jsson
- GitHub: https://github.com/carlosedujs/jsson
- Issues: https://github.com/carlosedujs/jsson/issues
Made with β€οΈ by Carlos Eduardo
Enjoy coding with JSSON! π
