Skip to content

Demo Example

This example demonstrates the fundamental features of JSSON in a single, practical configuration file.

// User configuration
user {
name = João
age = 20
admin = true
roles = [ "admin", "editor" ]
config {
theme = dark
language = pt-BR
notifications = true
}
preferences {
fontSize = 14
lineHeight = 1.5
autoSave = true
}
}
{
"user": {
"name": "João",
"age": 20,
"admin": true,
"roles": ["admin", "editor"],
"config": {
"theme": "dark",
"language": "pt-BR",
"notifications": true
},
"preferences": {
"fontSize": 14,
"lineHeight": 1.5,
"autoSave": true
}
}
}
name = João
age = 20

No quotes needed for simple values!

admin = true
notifications = true
autoSave = true

Native boolean support.

roles = [ "admin", "editor" ]

Mix quoted and unquoted values as needed.

user {
config {
theme = dark
}
}

Clean, readable nesting without JSON ceremony.

// User configuration

Document your configs!

fontSize = 14 // Number
lineHeight = 1.5 // Float
autoSave = true // Boolean
theme = dark // String

All JSON types supported.

  1. Save the JSSON code above to demo.jsson
  2. Run: jsson -i demo.jsson -o demo.json
  3. Open demo.json to see the result!
user {
profile {
personal {
name = João
age = 20
}
professional {
title = "Developer"
company = "Tech Corp"
}
}
}
user {
name = João
socialMedia = [
{ platform = twitter, handle = "@joao" },
{ platform = github, handle = "joaodev" }
]
}
user {
name = João
skills = [ JavaScript, Python, Go ]
hobbies = [ coding, reading, gaming ]
languages = [ Portuguese, English, Spanish ]
}

Play with this file and make it your own! 🎨