Demo Example
This example demonstrates the fundamental features of JSSON in a single, practical configuration file.
The JSSON
Section titled “The JSSON”// User configurationuser {name = Joãoage = 20admin = trueroles = [ "admin", "editor" ]
config { theme = dark language = pt-BR notifications = true}
preferences { fontSize = 14 lineHeight = 1.5 autoSave = true}}The JSON Output
Section titled “The JSON Output”{"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 }}}What This Demonstrates
Section titled “What This Demonstrates”✅ Simple Assignments
Section titled “✅ Simple Assignments”name = Joãoage = 20No quotes needed for simple values!
✅ Booleans
Section titled “✅ Booleans”admin = truenotifications = trueautoSave = trueNative boolean support.
✅ Arrays
Section titled “✅ Arrays”roles = [ "admin", "editor" ]Mix quoted and unquoted values as needed.
✅ Nested Objects
Section titled “✅ Nested Objects”user { config { theme = dark }}Clean, readable nesting without JSON ceremony.
✅ Comments
Section titled “✅ Comments”// User configurationDocument your configs!
✅ Mixed Data Types
Section titled “✅ Mixed Data Types”fontSize = 14 // NumberlineHeight = 1.5 // FloatautoSave = true // Booleantheme = dark // StringAll JSON types supported.
Try It Yourself!
Section titled “Try It Yourself!”- Save the JSSON code above to
demo.jsson - Run:
jsson -i demo.jsson -o demo.json - Open
demo.jsonto see the result!
Variations to Try
Section titled “Variations to Try”Add More Nesting
Section titled “Add More Nesting”user {profile { personal { name = João age = 20 } professional { title = "Developer" company = "Tech Corp" }}}Add Arrays of Objects
Section titled “Add Arrays of Objects”user {name = JoãosocialMedia = [ { platform = twitter, handle = "@joao" }, { platform = github, handle = "joaodev" }]}Add More Arrays
Section titled “Add More Arrays”user {name = Joãoskills = [ JavaScript, Python, Go ]hobbies = [ coding, reading, gaming ]languages = [ Portuguese, English, Spanish ]}What’s Next?
Section titled “What’s Next?”- Basic Syntax Guide — Learn all the syntax features
- Templates Example — See template arrays in action
- Getting Started — Complete beginner’s guide
Play with this file and make it your own! 🎨