Getting Started
Welcome to JSSON! Let’s get you writing cleaner, more readable JSON in just a few minutes. 🚀
Why JSSON? ✨
Section titled “Why JSSON? ✨”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
- Template arrays turn spreadsheet-like data into structured JSON
- Map transformations for powerful data manipulation
- Ranges generate sequences automatically
- Includes split large configs into manageable files
- Expressions compute values on the fly
What You’ll Learn
Section titled “What You’ll Learn”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
Installation
Section titled “Installation”-
Download the JSSON binary
Head to the GitHub releases page and download the latest version for your platform.
-
Make it executable (Linux/macOS)
Terminal window chmod +x jsson -
Move to your PATH (optional but recommended)
Terminal window # Linux/macOSsudo mv jsson /usr/local/bin/# Windows: Add the directory to your PATH environment variable -
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/jssoncd jssongo build -o jsson cmd/jsson/main.go
Your First JSSON File
Section titled “Your First JSSON File”Let’s create a simple configuration file. Create a new file called config.jsson:
// My first JSSON fileapp {name = "My Awesome App"version = "1.0.0"debug = true}
server {host = localhostport = 8080}Notice how clean this is? No quotes around keys, no commas, no fuss!
Transpile to JSON
Section titled “Transpile to JSON”Now let’s convert this to JSON:
jsson -i config.jsson -o config.jsonThis creates config.json with perfect, valid JSON:
{"app": { "name": "My Awesome App", "version": "1.0.0", "debug": true},"server": { "host": "localhost", "port": 8080}}That’s it! You just wrote and transpiled your first JSSON file. 🎉
Understanding the Basics
Section titled “Understanding the Basics”Let’s break down what makes JSSON special:
1. No Quotes Needed (Usually)
Section titled “1. No Quotes Needed (Usually)”name = Joãocity = "São Paulo" // Use quotes for spacesage = 25{"name": "João","city": "São Paulo","age": 25}Rule of thumb: Use quotes when your value has spaces or special characters. Otherwise, skip them!
2. Objects Are Clean
Section titled “2. Objects Are Clean”user {name = Joãoemail = joao@example.com}{"user": { "name": "João", "email": "joao@example.com"}}3. Arrays Are Simple
Section titled “3. Arrays Are Simple”colors = [ red, blue, green ]numbers = [ 1, 2, 3, 4, 5 ]mixed = [ João, 25, true ]{"colors": ["red", "blue", "green"],"numbers": [1, 2, 3, 4, 5],"mixed": ["João", 25, true]}4. Comments Work!
Section titled “4. Comments Work!”// This is a commentname = João // Inline comments too!age = 25Comments are ignored during transpilation — use them to document your configs!
Common First-Time Mistakes
Section titled “Common First-Time Mistakes”❌ Forgetting Quotes for Multi-Word Values
Section titled “❌ Forgetting Quotes for Multi-Word Values”// Wrongtitle = Software Engineer
// Righttitle = "Software Engineer"❌ Using Commas Between Fields
Section titled “❌ Using Commas Between Fields”// Wrongname = João,age = 25,
// Rightname = Joãoage = 25JSSON doesn’t need commas! Just put each field on a new line.
❌ Mixing Syntax Styles
Section titled “❌ Mixing Syntax Styles”// Wrong - mixing object stylesuser { name = João config = { theme: "dark" } // Don't use JSON syntax inside JSSON}
// Rightuser { name = João config { theme = dark }}Quick Reference
Section titled “Quick Reference”| Feature | JSSON | JSON |
|---|---|---|
| Keys | name = value | "name": value |
| Strings | João or "João" | "João" |
| Objects | obj { ... } | "obj": { ... } |
| Arrays | [ a, b, c ] | ["a", "b", "c"] |
| Comments | // comment | ❌ Not supported |
Try It Yourself!
Section titled “Try It Yourself!”Create a file called practice.jsson and try this:
// Your personal infoperson {name = "Your Name"age = 25hobbies = [ coding, reading, gaming ]
address { city = "Your City" country = Brazil}}
// Your favorite numbersluckyNumbers = [ 7, 13, 42 ]Then transpile it:
jsson -i practice.jsson -o practice.jsonOpen practice.json and see the beautiful JSON output!
What’s Next?
Section titled “What’s Next?”Now that you’ve got the basics down, here’s where to go:
- Basic Syntax Guide — Learn all the syntax features in detail
- Templates Guide — Discover the power of template arrays for structured data
- Syntax Reference — Complete reference with all features and examples
Ready to dive deeper? Let’s go! 🎯