JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q26485F
  • License MIT

Common Bracket Object Notation

Package Exports

  • cbon

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cbon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CommonBracketObjectNotation

Data-interchange format smaller than json

Syntax

{
  a 1
  b: 'string'
  c = "string"
  d true
  e { }
  f [ 1, 2.5 ]
  g null
  h no_space_str
  i 'Multi
line string'
}
// Multiple documents in one file
{a 1 b 2 c 3}
[ 123_456 1, 2.5 3. .4 5e3 0xaF ]
// [123456, 1, 2.5, 3, 0.4, 5000, 175]
  • cbon
    {a 1 b '2' c null d a}
  • json
    {"a":1,"b":"2","c":null,"d":"a"}
object  = '{' [ key [ ':' | '=' ] value [','] ] '}';
array   = '[' [ value [','] ] ']';
key     = word | string;
value   = object | array | string | word | number | 'null' | 'true' | 'false' ;
string  = ("'" anychar "'") | ('"' anychar '"');
word    = any_not_symbol;
number  = /(0x[\da-fA-F_]+)|(([\-]?([\d\_])+)\.([\-]?([\d\_])+([eE]([\-]?)\d+)?))|(([\-]?([\d\_])+)\.([eE]([\-]?)\d+)?)|([\-]?\.(([\d\_])+([eE]([\-]?)\d+)?))|(([\-]?([\d\_])+([eE]([\-]?)\d+)?))/