Skip to content

jsson-lang/jsson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSSON

JSSON Banner

JavaScript Simplified Object Notation — A universal configuration meta-format.

Write once, transpile to JSON, YAML, TOML, or TypeScript.

License: MIT VS Code Extension


Quick Example

JSSON:

@preset "api" {
  timeout = 30
  retries = 3
}

users [
  template { id, role }
  map (u) = @use "api" {
    id = @uuid
    email = @email
    role = u.role
    active = yes
  }
  1..5, "admin"
  6..100, "user"
]

Output (100 users):

{
  "users": [
    {
      "timeout": 30,
      "retries": 3,
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "email": "user_kx7m@example.com",
      "role": "admin",
      "active": true
    }
    // ... 99 more
  ]
}

Features

  • Logic-First: Variables, ranges, maps, conditionals, arithmetic
  • Presets: Reusable configuration templates with @preset and @use
  • Validators: Auto-generate UUIDs, emails, dates with @uuid, @email, @datetime
  • Multi-Format: Transpile to JSON, YAML, TOML, TypeScript
  • VS Code Extension: Full LSP support (syntax highlighting, diagnostics, auto-complete)
  • HTTP Server: Built-in REST API for integration
  • Schema Validation: Validate output against JSON Schema
  • Streaming: Handle millions of records efficiently

Installation

CLI

# Download from releases
curl -L https://github.com/carlosedujs/jsson/releases/latest/download/jsson-linux-amd64 -o jsson
chmod +x jsson && sudo mv jsson /usr/local/bin/

# Or build from source
go build -o jsson ./cmd/jsson

VS Code Extension

Install from the VS Code Marketplace.


Usage

# Transpile to JSON
jsson -i config.jsson > config.json

# Transpile to YAML
jsson -i config.jsson -f yaml > config.yaml

# Minified output
jsson -i config.jsson -m > config.min.json

# Start HTTP server
jsson serve

Documentation

📚 Full documentation: docs.jssonlang.tech


What's New in v0.0.6

  • Presets: Reusable configuration blocks with @preset and @use
  • Validators: Auto-generate data with @uuid, @email, @datetime, @url, @ipv4, etc.
  • Boolean Literals: Use yes/no and on/off as alternatives to true/false
  • Minify Flag: --minify for compact JSON output
  • Bug Fixes: Int/float comparison, bare identifier handling

See the Changelog for full details.


Contributing

Contributions are welcome! Please read the Contributing Guide.


License

MIT © Carlos Eduardo

About

Write less. Generate more. Universal Meta-Format.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages