Skip to content

FAQ

JSSON (JavaScript Simplified Object Notation) is a human-friendly syntax that transpiles to JSON. It removes the ceremony of JSON while maintaining 100% compatibility.

Think of it as: You write JSSON → Transpiler outputs JSON

JSON:

{
"user": {
"name": "João",
"age": 25,
"admin": true
}
}

JSSON:

user {
name = João
age = 25
admin = true
}

JSSON is cleaner, more readable, and supports comments!

Download the binary from GitHub Releases or build from source:

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

See the Getting Started guide for details.

Yes! JSSON transpiles to standard JSON, so the output is always valid and safe to use in production.

Use quotes when:

  • Values have spaces: title = "Software Engineer"
  • Values have special characters: email = "user@example.com"
  • You want to force a string: version = "1.0.0"

Skip quotes when:

  • Simple identifiers: name = João
  • Numbers: age = 25
  • Booleans: active = true

Rule of thumb: When in doubt, use quotes!

Yes! Single-line comments with //:

// This is a comment
name = João // Inline comment
age = 25

No! JSSON doesn’t use commas between object fields:

// Correct ✅
user {
name = João
age = 25
}
// Wrong ❌
user {
name = João,
age = 25,
}

Arrays still use commas: colors = [ red, blue, green ]

Just nest them naturally:

user {
name = João
config {
theme = dark
notifications {
email = true
push = false
}
}
}

No. Choose one or the other. JSSON files should use JSSON syntax throughout.

Template arrays let you define structure once, then list data rows:

users [
template { name, age, job }
João, 25, Developer
Maria, 30, Designer
Pedro, 28, Manager
]

See the Templates Guide for details!

The map clause transforms template data:

routes [
template { path, method }
map (item) = {
path = "/api/" + item.path
method = item.method
version = "v1"
}
users, GET
posts, POST
]

It adds computed fields and transforms values!

Ranges generate numeric sequences:

ports = [ 8080..8085 ]
// Becomes: [8080, 8081, 8082, 8083, 8084, 8085]
evens = [ 0..10 step 2 ]
// Becomes: [0, 2, 4, 6, 8, 10]

Use include to split large configs:

database.jsson:

database {
host = localhost
port = 5432
}

main.jsson:

include "database.jsson"
host = localhost
port = 8080
  • Configuration files (app configs, server settings)
  • Seed data (database fixtures, test data)
  • Mock APIs (fake data for development)
  • Structured lists (products, users, routes)
  • Data templates (CSV-like data → JSON)

Yes! Use include to split large configs into modules:

config/
├── main.jsson
├── database.jsson
├── api.jsson
└── cache.jsson

Yes! Integrate with npm scripts, Makefiles, or CI/CD:

package.json:

{
"scripts": {
"build:config": "jsson -i config.jsson -o dist/config.json"
}
}

See the CLI Guide for integration examples!

JSSON adds a transpilation step, so it’s slightly slower than parsing JSON directly. However:

  • Development: JSSON is faster to write and maintain
  • Production: Use transpiled JSON (no runtime overhead)

Yes! Run the transpiler to check for errors:

Terminal window
jsson -i config.jsson

If there are errors, you’ll see helpful messages from the goblins, wizards, and gremlins! 🧙‍♂️

FeatureJSSONJSON
Quotes on keys❌ Not needed✅ Required
Quotes on valuesOptionalRequired for strings
Comments✅ Supported❌ Not supported
CommasOnly in arraysRequired everywhere
Templates✅ Built-in❌ Not available
Ranges✅ Built-in❌ Not available
Expressions✅ Supported❌ Not available
FeatureJSSONYAML
SyntaxSimple, JSON-likeIndentation-based
OutputJSONYAML (or JSON)
Learning curveLowMedium
Templates✅ Built-in❌ Not available
ComplexitySimpleCan be complex
FeatureJSSONTOML
SyntaxJSON-likeINI-like
OutputJSONTOML
Arrays of objectsEasy (templates)Verbose
NestingNaturalCan be awkward

I’m getting “Illegal character” errors

Section titled “I’m getting “Illegal character” errors”

You’re using a special character without quotes:

// Wrong ❌
email = user@example.com
// Right ✅
email = "user@example.com"

My template has the wrong number of values

Section titled “My template has the wrong number of values”

Each row must match the template:

users [
template { name, age, email }
João, 25, "joao@test.com" // ✅ 3 values
Maria, 30 // ❌ Only 2 values
]

Check that:

  1. The file exists
  2. The path is correct (relative to the including file)
  3. The extension is .jsson

Yes! JSSON is open source. See the Contributing Guide for details.

Open an issue on GitHub with:

  • Your JSSON code
  • The error message
  • Expected vs actual behavior

Absolutely! Open a feature request on GitHub Issues.

Check out:

Still stuck? Ask on GitHub Discussions! 🚀