{"id":34656703,"url":"https://github.com/jsson-lang/jsson","last_synced_at":"2026-05-29T00:01:27.638Z","repository":{"id":325846836,"uuid":"1102573599","full_name":"jsson-lang/jsson","owner":"jsson-lang","description":"Write less. Generate more. Universal Meta-Format. ","archived":false,"fork":false,"pushed_at":"2026-05-27T23:09:30.000Z","size":93538,"stargazers_count":50,"open_issues_count":2,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T23:20:19.689Z","etag":null,"topics":["dev","devops-tools","format","json","toml","transpiler","typescript","yaml"],"latest_commit_sha":null,"homepage":"https://www.jssonlang.tech","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsson-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-23T17:46:58.000Z","updated_at":"2026-05-27T22:07:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jsson-lang/jsson","commit_stats":null,"previous_names":["carlosedujs/jsson","jsson-lang/jsson"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/jsson-lang/jsson","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsson-lang%2Fjsson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsson-lang%2Fjsson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsson-lang%2Fjsson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsson-lang%2Fjsson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsson-lang","download_url":"https://codeload.github.com/jsson-lang/jsson/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsson-lang%2Fjsson/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33630999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dev","devops-tools","format","json","toml","transpiler","typescript","yaml"],"created_at":"2025-12-24T18:05:48.581Z","updated_at":"2026-05-29T00:01:27.630Z","avatar_url":"https://github.com/jsson-lang.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSSON\n\n**JavaScript Simplified Object Notation** — A configuration language that transpiles to JSON, YAML, TOML, and TypeScript.\n\nWrite config once. Ship it anywhere.\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![VS Code Extension](https://img.shields.io/badge/VS%20Code-Extension-blue)](https://marketplace.visualstudio.com/items?itemName=carlosedujs.jsson)\n[![CI](https://github.com/jsson-lang/jsson/actions/workflows/ci.yml/badge.svg)](https://github.com/jsson-lang/jsson/actions/workflows/ci.yml)\n\n---\n\n## Why JSSON?\n\nJSON 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.\n\nJSSON gives you a modern, human-friendly syntax with **variables, templates, ranges, conditionals, and presets** — and transpiles to the format your tools actually expect.\n\n```javascript\n// config.jsson — comments, variables, expressions\nbase_url := \"https://api.example.com\"\ntimeout := 30\n\nserver {\n  url = base_url + \"/v2\"\n  timeout = timeout\n  retries = retries \u003e 5 ? 5 : retries\n  active = yes\n}\n```\n\n```json\n// → config.json\n{\n  \"url\": \"https://api.example.com/v2\",\n  \"timeout\": 30,\n  \"retries\": 3,\n  \"active\": true\n}\n```\n\n---\n\n## Quick Start\n\n### Install\n\n```bash\n# Download the latest binary (Linux/macOS)\ncurl -L https://github.com/jsson-lang/jsson/releases/latest/download/jsson-linux-amd64 -o jsson\nchmod +x jsson \u0026\u0026 sudo mv jsson /usr/local/bin/\n\n# Or build from source\ngit clone https://github.com/jsson-lang/jsson.git\ncd jsson\nmake build\nsudo make install\n```\n\n### Your first JSSON file\n\n```javascript\n// hello.jsson\nmessage = \"Hello, JSSON!\"\nversion = \"0.1.0\"\n\napp {\n  name = \"My First App\"\n  language = \"JSSON\"\n}\n```\n\n```bash\njsson -i hello.jsson\n```\n\n```json\n{\n  \"message\": \"Hello, JSSON!\",\n  \"version\": \"0.1.0\",\n  \"app\": {\n    \"name\": \"My First App\",\n    \"language\": \"JSSON\"\n  }\n}\n```\n\n---\n\n## Language Tour\n\n### Variables and Expressions\n\n```javascript\nbase_url := \"https://api.example.com\"\nversion := \"v1\"\ntimeout := 30\nretries := 3\n\napi {\n  url = base_url + \"/\" + version\n  timeout = timeout\n  retries = retries\n}\n\n// Arithmetic\nprice := 100\ndiscount := 0.2\nfinal_price = price - (price * discount)\n```\n\n### Objects and Nesting\n\n```javascript\ncompany {\n  name = \"TechCorp\"\n\n  address {\n    street = \"123 Main St\"\n    city = \"San Francisco\"\n    zip = \"94105\"\n  }\n\n  contact {\n    email = \"hello@techcorp.com\"\n    phone = \"+1 555-0123\"\n  }\n}\n```\n\n### Arrays and Ranges\n\n```javascript\n// Static arrays\ncolors = [\"red\", \"green\", \"blue\"]\n\n// Ranges (expanded at transpile time)\nports = 8000..8005\n// → [8000, 8001, 8002, 8003, 8004, 8005]\n\nletters = \"a\"..\"f\"\n// → [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\"]\n```\n\n### Templates and Maps\n\nGenerate repetitive structures with logic:\n\n```javascript\nusers [\n  template { id, role }\n  map (u) = {\n    id = u.id\n    role = u.role\n    active = true\n  }\n  1..100, \"admin\"\n  101..1000, \"user\"\n]\n```\n\n→ Produces 1000 user objects with proper IDs and roles.\n\n### Presets\n\nDefine reusable configuration blocks:\n\n```javascript\n@preset \"server-defaults\" {\n  port = 8080\n  host = \"localhost\"\n  timeout = 30\n}\n\n// Use with overrides\nproduction = @\"server-defaults\" {\n  port = 443\n  host = \"0.0.0.0\"\n  timeout = 60\n}\n```\n\n### Conditionals\n\n```javascript\nenv := \"production\"\ndebug = env == \"development\" ? true : false\n\nrate_limit = env == \"production\" ? 1000 : 100\n```\n\n### Validators\n\nGenerate realistic data for testing and seeding:\n\n```javascript\n@preset \"user-gen\" {\n  id = @uuid\n  email = @email\n  created_at = @datetime\n}\n\ntest_user = @\"user-gen\" {\n  email = \"admin@test.com\"\n}\n```\n\nBuilt-in validators: `@uuid`, `@email`, `@datetime`, `@url`, `@ipv4`, `@int`, `@float`, `@string`, and more.\n\n### Includes\n\nSplit configs across files:\n\n```javascript\n// main.jsson\nserver {\n  port = 3000\n}\n\napi = include \"api.jsson\"\ndatabase = include \"database.jsson\"\n```\n\n---\n\n## CLI Reference\n\n```bash\n# Transpile to JSON (default)\njsson -i config.jsson\n\n# Pick output format\njsson -i config.jsson -f yaml\njsson -i config.jsson -f toml\njsson -i config.jsson -f typescript\n\n# Read from stdin\necho 'name = \"JSSON\"' | jsson -i -\n\n# Write to file\njsson -i config.jsson -o output.json\n\n# Minify output\njsson -i config.jsson -m\n\n# Format a JSSON file\njsson fmt config.jsson          # print formatted\njsson fmt -w config.jsson       # write in-place\njsson fmt -check config.jsson   # validate formatting (CI)\n\n# Validate against a schema\njsson -i config.jsson -schema schema.json\n\n# Start HTTP server\njsson serve\njsson serve -port 3000\n\n# Version info\njsson --version\n# → JSSON v0.1.0 (commit=abc1234, date=2026-05-28T19:48:26Z)\n```\n\n### Output Formats\n\n| Flag | Format | Extensions |\n|------|--------|------------|\n| `json` (default) | JSON | `.json` |\n| `yaml` | YAML | `.yaml`, `.yml` |\n| `toml` | TOML | `.toml` |\n| `typescript` | TypeScript | `.ts` |\n\n---\n\n## Development\n\n```bash\nmake build       # Build the binary → bin/jsson\nmake test        # Run unit tests\nmake test-e2e    # Run e2e golden file tests\nmake lint        # go vet + gofmt check\nmake fmt         # Format all Go source files\nmake run         # Build and run\nmake clean       # Remove build artifacts\nmake install     # Copy to GOPATH/bin\n```\n\nThe project uses [GoReleaser](https://goreleaser.com) for cross-platform releases. To cut a new release:\n\n```bash\ngit tag v0.2.0\ngit push origin v0.2.0\n```\n\nThe release workflow builds for Linux, macOS, and Windows (amd64 + arm64), creates archives, generates checksums, and publishes a GitHub release.\n\n---\n\n## When to use JSSON\n\n**Good for:**\n- Configuration files that need variables and logic\n- Generating repetitive config structures (environments, users, deployments)\n- Multi-format pipelines (same source → JSON for API + YAML for K8s + TOML for app)\n- Test data generation with validators\n- Prototyping and scaffolding\n\n**Not ideal for:**\n- Machine-to-machine data interchange (stick to JSON)\n- Performance-critical parsing (JSSON prioritizes ergonomics over speed)\n- Nested data beyond ~5 levels (flatter structures work better)\n\n---\n\n## Documentation\n\nFull documentation at [docs.jssonlang.tech](https://docs.jssonlang.tech)\n\n- [Getting Started](https://docs.jssonlang.tech/docs/core/guides/getting-started)\n- [Syntax Reference](https://docs.jssonlang.tech/docs/core/reference/syntax)\n- [Presets Guide](https://docs.jssonlang.tech/docs/core/guides/presets)\n- [Validators Guide](https://docs.jssonlang.tech/docs/core/guides/validators)\n- [CLI Reference](https://docs.jssonlang.tech/docs/cli)\n- [HTTP Server API](https://docs.jssonlang.tech/docs/server)\n- [VS Code Extension](https://docs.jssonlang.tech/docs/editor)\n\n---\n\n## VS Code Extension\n\nSyntax highlighting, diagnostics, auto-complete, hover previews, and more.\n\nInstall from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=carlosedujs.jsson).\n\n---\n\n## Contributing\n\nContributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\nThis 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.\n\n---\n\n## License\n\nMIT © [Carlos Eduardo](https://github.com/carlosedujs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsson-lang%2Fjsson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsson-lang%2Fjsson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsson-lang%2Fjsson/lists"}