IntraWeb 17IntraWeb General

IWML Format Change

IWML is still very much in flux. We had planned to eventually design our own format instead of using JSON for a variety of reasons and we already chose JSON over XML because XML is too verbose. JSON gets pretty verbose as well though the bigger the file gets and in IWML usage can get pretty hard to read visually. Thus we are moving up our plans to design our own format for IWML to replace JSON.

The goals of using our own format are:

  • Line Based – This simplifies parsing and writing as it eliminates a lot of markers and escape sequences
  • Typeability – Reduce the number of symbols which require the shift key to enter. JSON with the { and ” can almost produce carpel tunnel syndrome when hand editing.
  • Readability – The default JSON formatters expand JSON and use a lot of space for the braces, ie putting them on their own lines.
  • Compactness – Eliminates a lot of syntactic fluff that exists for lexical reasons only
  • Comments – Add ability to insert comments both for debugging by disabling sections, but also for real comments. JSON does not allow comments.

IWML as JSON

Currently IWML files stored as JSON look like this:

IWML as ACORN (Atozed Compact Object Readable Notation)

This format is still being developed, but currently the above JSON would look like this as ACORN:

Notes:

  • No need to surround names or values in quotes.
  • EOL is the terminator of each item.
  • A single ] on a line is the end of block marker.
  • : plus a space is the separator between names and values. : does require a shift and = was considered instead, but = is shifted on many keyboards and : seemed to produce a visually cleaner result.
  • # as the first non whitespace character denotes a comment.
  • All keys and markers will be case sensitive at some point, but some may be case sensitive initially for reasons of simplicity.
  • Sub properties containing objects can still be abbreviated using a period. See CellDefaults in example.
  • Multi line text can be inserted using [ and ].