Skip to content

Getting Started

Welcome to JSSON! Let’s get you writing cleaner, more readable JSON in just a few minutes. 🚀

JSSON makes writing JSON feel natural. No more wrestling with quotes, commas, and brackets. Write configuration files the way you think about them — clean, readable, and human-friendly.

What makes JSSON special:

  • No quotes needed for simple values
  • Variables:
    • 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
  • Template arrays turn spreadsheet-like data into structured JSON
  • Nested Arrays Map transformations can now be nested inside other maps for multi-level data pipelines
  • Map transformations for powerful data manipulation
  • Ranges generate sequences automatically
  • Includes split large configs into manageable files
  • Expressions compute values on the fly
  • Multi-Format Output (JSON, YAML, TOML, TypeScript)

By the end of this guide, you’ll:

  • Install the JSSON CLI
  • Write your first JSSON file
  • Transpile it to JSON
  • Understand the basics of JSSON syntax
  1. Download the JSSON binary

    Head to the GitHub releases page and download the latest version for your platform.

  2. Make it executable (Linux/macOS)

    Terminal window
    chmod +x jsson
  3. Move to your PATH (optional but recommended)

    Terminal window
    # Linux/macOS
    sudo mv jsson /usr/local/bin/
    # Windows: Add the directory to your PATH environment variable
  4. Verify installation

    Terminal window
    jsson --version

Building from source? If you have Go installed, you can build JSSON yourself:

Terminal window
git clone https://github.com/carlosedujs/jsson
cd jsson
go build -o jsson cmd/jsson/main.go

Let’s create a simple configuration file. Create a new file called config.jsson:

// My first JSSON file
app {
name = "My Awesome App"
version = "1.0.0"
debug = true
}
server {
host = "localhost"
port = 8080
}

Run the CLI to convert it to JSON:

Terminal window
jsson -i config.jsson > config.json

Open config.json and see the result:

{
"app": {
"name": "My Awesome App",
"version": "1.0.0",
"debug": true
},
"server": {
"host": "localhost",
"port": 8080
}
}
name = João
city = "São Paulo" // Use quotes for spaces
age = 25

Rule of thumb: Use quotes when your value has spaces or special characters. Otherwise, skip them!

user {
name = João
email = joao@example.com
}
colors = [ red, blue, green ]
numbers = [ 1, 2, 3, 4, 5 ]
mixed = [ João, 25, true ]
// This is a comment
name = João // Inline comments too!
age = 25

Comments are ignored during transpilation — use them to document your configs!

Declare variables with := to avoid repetition. Variables don’t appear in the final JSON:

// Define once
api_url := "https://api.example.com"
timeout := 5000
// Use everywhere
production {
url = api_url
timeout = timeout
}
staging {
url = api_url
timeout = timeout
}

Pro Tip: Variables are perfect for configuration constants that you use in multiple places!

❌ Forgetting Quotes for Multi-Word Values

Section titled “❌ Forgetting Quotes for Multi-Word Values”
// Wrong
title = Software Engineer
// Right
title = "Software Engineer"
// Wrong
name = João,
age = 25,
// Right
name = João
age = 25

JSSON doesn’t need commas! Just put each field on a new line.

// Wrong - mixing object styles
user {
name = João
config = { theme: "dark" } // Don't use JSON syntax inside JSSON
}
// Right
user {
name = João
config {
theme = dark
}
}
FeatureJSSONJSON
Keysname = value"name": value
StringsJoão or "João""João"
Objectsobj { ... }"obj": { ... }
Arrays[ a, b, c ]["a", "b", "c"]
Comments// comment❌ Not supported

Create a file called practice.jsson and try this:

// Your personal info
person {
name = "Your Name"
age = 25
hobbies = [ coding, reading, gaming ]
address {
city = "Your City"
country = Brazil
}
}
// Your favorite numbers
luckyNumbers = [ 7, 13, 42 ]

Then transpile it:

Terminal window
jsson -i practice.jsson > practice.json

Open practice.json and see the beautiful JSON output!

Now that you’ve got the basics down, here’s where to go:

Ready to dive deeper? Let’s go! 🎯