Syntax Reference
Let’s dive in!
Comments
Section titled “Comments”Keep your configs documented with single-line comments:
// This is a commentname = João // Inline commentage = 20Pro Tip: Use comments to explain why a configuration exists, not just what it is.
Basic Assignments
Section titled “Basic Assignments”The heart of JSSON: simple key-value pairs without the quote ceremony.
name = Joãoage = 20height = 1.75admin = true{"name": "João","age": 20,"height": 1.75,"admin": true}When to use quotes:
- Use quotes when your value contains spaces:
title = "Software Engineer" - Skip quotes for simple identifiers:
name = João
Data Types
Section titled “Data Types”JSSON supports all JSON data types with a cleaner syntax:
// Strings (with or without quotes)name = Joãotitle = "Software Engineer"
// Numbers (integers and floats)age = 25price = 19.99
// Booleansactive = truedisabled = false{"name": "João","title": "Software Engineer","age": 25,"price": 19.99,"active": true,"disabled": false}Objects
Section titled “Objects”Nested objects are clean and intuitive — perfect for configuration files:
user {name = Joãoage = 20admin = trueconfig { theme = dark notifications = true}}{"user": { "name": "João", "age": 20, "admin": true, "config": { "theme": "dark", "notifications": true }}}Use Case: Perfect for app configs, server settings, and any hierarchical data.
Arrays
Section titled “Arrays”Mix any types freely — no quotes needed for simple values:
numbers = [ 1, 2, 3, 4, 5 ]colors = [ red, blue, green ]mixed = [ João, 25, true, 1.75 ]{"numbers": [1, 2, 3, 4, 5],"colors": ["red", "blue", "green"],"mixed": ["João", 25, true, 1.75]}Power move: The
mapclause lets you transform each row. Add prefixes, compute values, or inject default fields — all in one place!
Expressions 🧮
Section titled “Expressions 🧮”Compute values instead of hardcoding them:
price = 100tax = 15total = price + tax
discount = 20final = total - discount
quantity = 5itemPrice = 10subtotal = quantity * itemPrice{"price": 100,"tax": 15,"total": 115,"discount": 20,"final": 95,"quantity": 5,"itemPrice": 10,"subtotal": 50}Supported operators:
- Arithmetic:
+,-,*,/,%(modulo) - Grouping:
( )for precedence
Use Case: Perfect for configs where values depend on each other — no need to manually calculate!
Member Access
Section titled “Member Access”Access object properties using dot notation:
config {host = localhostport = 5432}
connectionString = config.host + ":" + config.port{"config": { "host": "localhost", "port": 5432},"connectionString": "localhost:5432"}Pro Tip: Combine member access with expressions to build dynamic values from existing config!
Conditional Logic 🔀
Section titled “Conditional Logic 🔀”JSSON supports powerful conditional logic with comparison operators and ternary expressions.
Comparison Operators
Section titled “Comparison Operators”Compare values to get boolean results:
age = 20isAdult = age >= 18 // truecanRentCar = age >= 25 // falseisTeenager = age >= 13hasDiscount = age < 12Supported operators: ==, !=, >, <, >=, <=
Ternary Operator
Section titled “Ternary Operator”Choose between two values based on a condition:
status = age >= 18 ? "adult" : "minor"access = role == "admin" ? "full" : "limited"You can even nest them for complex logic:
salary = level == "senior" ? 120000 : level == "mid" ? 80000 : 50000Include Files 🧩
Section titled “Include Files 🧩”Split large configurations across multiple files for better organization:
database {host = "localhost"port = 5432}api {url = "https://api.example.com"timeout = 5000}
include "database.jsson"{"api": { "url": "https://api.example.com", "timeout": 5000},"database": { "host": "localhost", "port": 5432}}Organization: Split by concern (database.jsson, api.jsson). Use main file to include others.
Expressions: Great for derived values. Reduces errors, makes configs self-documenting.
Ranges: Perfect for sequential data. Use step for custom increments.
Keywords Reference
Section titled “Keywords Reference”| Keyword | Description |
|---|---|
template | Defines the structure for array items |
map | Transforms template data with custom logic |
include | Imports another JSSON file |
step | Defines the increment in ranges |
true / false | Boolean values |
Operators
Section titled “Operators”| Operator | Description |
|---|---|
= | Assignment |
+ | Addition / Concatenation |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Modulo (remainder) |
== != | Equality / Inequality |
> < | Greater / Less than |
>= <= | Greater/Less than or equal |
? : | Ternary conditional |
.. | Range operator |
. | Member access |