JavaScript Simplified Object Notation — A configuration language that transpiles to JSON, YAML, TOML, and TypeScript.
Write config once. Ship it anywhere.
JSON is everywhere, but writing it by hand hurts. Missing commas, no comments, no variables, no expressions. YAML is better but has whitespace nightmares and security footguns. TOML is pleasant but limited.
JSSON gives you a modern, human-friendly syntax with variables, templates, ranges, conditionals, and presets — and transpiles to the format your tools actually expect.
// config.jsson — comments, variables, expressions
base_url := "https://api.example.com"
timeout := 30
server {
url = base_url + "/v2"
timeout = timeout
retries = retries > 5 ? 5 : retries
active = yes
}// → config.json
{
"url": "https://api.example.com/v2",
"timeout": 30,
"retries": 3,
"active": true
}# Download the latest binary (Linux/macOS)
curl -L https://github.com/jsson-lang/jsson/releases/latest/download/jsson-linux-amd64 -o jsson
chmod +x jsson && sudo mv jsson /usr/local/bin/
# Or build from source
git clone https://github.com/jsson-lang/jsson.git
cd jsson
make build
sudo make install// hello.jsson
message = "Hello, JSSON!"
version = "0.1.0"
app {
name = "My First App"
language = "JSSON"
}jsson -i hello.jsson{
"message": "Hello, JSSON!",
"version": "0.1.0",
"app": {
"name": "My First App",
"language": "JSSON"
}
}base_url := "https://api.example.com"
version := "v1"
timeout := 30
retries := 3
api {
url = base_url + "/" + version
timeout = timeout
retries = retries
}
// Arithmetic
price := 100
discount := 0.2
final_price = price - (price * discount)company {
name = "TechCorp"
address {
street = "123 Main St"
city = "San Francisco"
zip = "94105"
}
contact {
email = "hello@techcorp.com"
phone = "+1 555-0123"
}
}// Static arrays
colors = ["red", "green", "blue"]
// Ranges (expanded at transpile time)
ports = 8000..8005
// → [8000, 8001, 8002, 8003, 8004, 8005]
letters = "a".."f"
// → ["a", "b", "c", "d", "e", "f"]Generate repetitive structures with logic:
users [
template { id, role }
map (u) = {
id = u.id
role = u.role
active = true
}
1..100, "admin"
101..1000, "user"
]→ Produces 1000 user objects with proper IDs and roles.
Define reusable configuration blocks:
@preset "server-defaults" {
port = 8080
host = "localhost"
timeout = 30
}
// Use with overrides
production = @"server-defaults" {
port = 443
host = "0.0.0.0"
timeout = 60
}env := "production"
debug = env == "development" ? true : false
rate_limit = env == "production" ? 1000 : 100Generate realistic data for testing and seeding:
@preset "user-gen" {
id = @uuid
email = @email
created_at = @datetime
}
test_user = @"user-gen" {
email = "admin@test.com"
}Built-in validators: @uuid, @email, @datetime, @url, @ipv4, @int, @float, @string, and more.
Split configs across files:
// main.jsson
server {
port = 3000
}
api = include "api.jsson"
database = include "database.jsson"# Transpile to JSON (default)
jsson -i config.jsson
# Pick output format
jsson -i config.jsson -f yaml
jsson -i config.jsson -f toml
jsson -i config.jsson -f typescript
# Read from stdin
echo 'name = "JSSON"' | jsson -i -
# Write to file
jsson -i config.jsson -o output.json
# Minify output
jsson -i config.jsson -m
# Format a JSSON file
jsson fmt config.jsson # print formatted
jsson fmt -w config.jsson # write in-place
jsson fmt -check config.jsson # validate formatting (CI)
# Validate against a schema
jsson -i config.jsson -schema schema.json
# Start HTTP server
jsson serve
jsson serve -port 3000
# Version info
jsson --version
# → JSSON v0.1.0 (commit=abc1234, date=2026-05-28T19:48:26Z)| Flag | Format | Extensions |
|---|---|---|
json (default) |
JSON | .json |
yaml |
YAML | .yaml, .yml |
toml |
TOML | .toml |
typescript |
TypeScript | .ts |
make build # Build the binary → bin/jsson
make test # Run unit tests
make test-e2e # Run e2e golden file tests
make lint # go vet + gofmt check
make fmt # Format all Go source files
make run # Build and run
make clean # Remove build artifacts
make install # Copy to GOPATH/binThe project uses GoReleaser for cross-platform releases. To cut a new release:
git tag v0.2.0
git push origin v0.2.0The release workflow builds for Linux, macOS, and Windows (amd64 + arm64), creates archives, generates checksums, and publishes a GitHub release.
Good for:
- Configuration files that need variables and logic
- Generating repetitive config structures (environments, users, deployments)
- Multi-format pipelines (same source → JSON for API + YAML for K8s + TOML for app)
- Test data generation with validators
- Prototyping and scaffolding
Not ideal for:
- Machine-to-machine data interchange (stick to JSON)
- Performance-critical parsing (JSSON prioritizes ergonomics over speed)
- Nested data beyond ~5 levels (flatter structures work better)
Full documentation at docs.jssonlang.tech
- Getting Started
- Syntax Reference
- Presets Guide
- Validators Guide
- CLI Reference
- HTTP Server API
- VS Code Extension
Syntax highlighting, diagnostics, auto-complete, hover previews, and more.
Install from the VS Code Marketplace.
Contributions are welcome. See CONTRIBUTING.md for guidelines.
This project was refactored during a hackathon focused on improving abandonware with AI assistance. The PR tells the full story: typed AST, golden file tests, goreleaser, Makefile, and more — 17 commits, 207 files, ~45k lines changed.
MIT © Carlos Eduardo