/*
_ _ _ _ _
/ \ / \ / \ / \ / \
( N | o | j | s | e )
\_/ \_/ \_/ \_/ \_/
The Nojse Data Interchange Standard.
*/
[
about : "Nojse - pronounced as English word: 'nice' - is a Json derivative."
inspiration : [
'https://www.json.org/json-en.html'
'https://json5.org/'
'https://www.relaxedjson.org/'
'https://yaml.org/'
]
this_document : `This document is a valid Nojse file`
last_update : 0d2026-06-07
design_goals : [
"Clean look and feel."
"Easy to read, easy to write for humans & machines."
"Suitable for configuration files."
'Simplified version of Json.'
'Enhanced version of Json.'
]
nojse_features :
[
containers : [
`Objects (keyvaluelists) and arrays (valuelists) use brackets [ ... ]`
`Standard json curly brackets { ... } are not allowed.`
`Commas are not allowed.`
]
keys : [
`Keys must be an identifier name.`
`Quoted keys, as used in standard json, are not allowed.`
`Keys with non-standard characters are possible with special $ notation.`
]
strings : [
"Strings may be double quoted."
'Strings may be single quoted.'
`Strings may be backtick quoted.`
"Strings may span" +
' multiple lines ' +
`by concatenation.`
`Strings may include the standard json character escapes.`
]
numbers : [
`Numbers may be hexadecimal.`
`Numbers may be dates (UTC format).`
`Numbers may have a leading point.`
`Numbers may begin with an explicit plus sign.`
]
reserved_words: [
`Nojse does not define reserved words like true, false & null`
`Reserved words start with a dot.`
`The dot is followed by a valid identifier name.`
]
comments : [
`Single line comments are allowed` // single line comment
`Multi line comments are allowed` /* multi line comment */
]
whitespace : `All ascii characters <= " " are treated as whitespace.`
]
autodetect:
[
what_it_is : 'Nojse has no separate arrays and objects.'
+ 'It has a "container" type instead.'
+ 'The Nojse parser will autodetect the elements in a container:'
+ 'First element is a key ? -> keyvaluelist (object).'
+ 'Otherwise: -> valuelist (array).'
empty : []
v_one : [ 123.45 ]
kv_one : [ test : 123.45 ]
v_two : [ 0x89ab 0x67ef ]
kv_two : [ hex1 : 0x89ab hex2 : 0x67ef ]
v_three : [ "Crimson" "Olive" "Turquoise" ]
kv_three : [ red : "Crimson" green : "Olive" blue : "Turquoise" ]
// You can't go wrong with Nojse: a container is always [ ... ] and never { ... }
]
keys: // if you really want, you can use 'special' characters in Nojse keys
[
Simple_Identifier_123 : 1 // First char is a..z or A..Z or _ Next char also 0..9
$Kastkær: 2 // Place in Denmark (note: no space before semicolon)
$Hillerød: 3 // Place in Denmark
$Key with spaces: 4 // The key is "Key with spaces"
// Key is the characters between $ and :
]
reserved_words:
[
json : [ .true .false .null ] // Json has three reserved words
json5 : [ .Infinity .NaN ] // Json5 adds two more reserved words
nojse : [ .pi .avogadro ] // Nojse lets you define any constant you would like to use
// Nojse reserved words start with a dot: they are parsed as 'numbers'
// This is a design choice: keys (without dot) and constants (with dot) are two different things
]
numbers:
[
+123 // not possible in standard Json
123
-123
.123 // not possible in standard Json
0.123
]
hexnumbers: // some random guids
[
0x16e4156c53a24181a9cd16df6327a50d
0x420870a438af4b20954e3c04504b0dfd
0xe4ad5b25c0814fa69ee5e2219f12434b
0x8123d9b2495f43648c8b7087a8553068
0xd7b7e0b35f774d0d9bbbe9232fceaea6
]
datetime: // UTC datetime (ISO 8601) is standard in Nojse
[
0d2026-06-07
0d2026-06-07T14:26
0d2026-06-07T14:26:54
0d2026-06-07T14:26:54.567
0d2026-06-07T14:26Z+01:00
0d2026-06-07T14:26Z-02:00
]
]