NOJSE Data Interchange Format

A user friendly JSON dialect

Structured data

Some interesting links to JSON related sites


Parser construction

Step by step guide to building a NOJSE parser with JavaScript



Running the examples

All examples are written in JavaScript and run in your browser.

Open developer tools in your browser:

  • and press F12
  • or press ctrl-shift-i
  • or rightclick and choose inspect from menu

Select the right tab:

  • Console for parser output
  • Sources for JavaScript sourcecode

JSON in a nutshell

  • numbers: 123, 123.45, -123.45e-6
  • strings: "Hi !"
  • true, false, null
  • arrays: [ 12, 34, 56 ]
  • objects: { "red":1, "green":2, "blue":3 }
  • comment not a allowed by design

Moving from JSON to NOJSE

  • # Python style comment
  • strings: "Hi !", 'Hi !', `Hi !`
  • container [] for both array and object
  • do not use {} for containers
  • do not use commas: [ 12 34 56 ]
  • use keys without quotes: [ red:1 green:2 blue:3 ]
  • invalid: true, false, null (false=0, true=not 0)
  • multiline strings: 'one' + 'two' + 'three'
  • adding newlines: 'one' & 'two' & 'three'
  • hexadecimal values: 0x89ab
  • date values (UTC standard): 0d2025-09-29

Sample NOJSE document

# example found at: https://json.org/example.html
# slightly modified for extra features
[
  glossary:
  [
    title   : 'example glossary'
    GlossDiv:
    [
      title    : 'S'
      GlossList:
      [
        GlossEntry:
        [
          ID        : `SGML`
          SortAs    : `SGML`
          GlossTerm : 'Standard Generalized Markup Language'
          Acronym   : "SGML"
          Abbrev    : 'ISO 8879:1986'
          GlossDef  :
          [              # multiline string
            para         : 'A meta-markup language, '
                         + 'used to create markup languages '
                         + 'such as DocBook.'
            GlossSeeAlso : [ 'GML', 'XML' ]
          ]
          GlossSee  : 'markup'
        ]
      ]
    ]
    last_change: 0d2024-01-31T09:30:27Z
    id         : 0x5b52391ca090f1ed
  ]
]

Creating a NOJSE parser

The NOJSE standard is defined by the reference parser. This is written in simple and understandable JavaScript. With only 300 lines of code, the parser is very compact and can be easily converted into any other programming language. JavaScript was chosen because it is available in every web browser. No software installation is required.

The parser is designed as a converter that translates a NOJSE source to JSON. This makes the software directly deployable in a production environment, as the target typically offers extensive options for working with JSON files.

We show not only the final product, but also the process of creating the NOJSE parser. Six extra downloads are available for the interested reader, ranging from simple to advanced, demonstrating how the NOJSE parser was built. Studying it will enhance your understanding of the language.

NOJSE Data Interchange Format : site updated 2025-10-05