Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

MeowType/CommonBracketObjectNotation

Repository files navigation

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+)?))/

About

Data-interchange format smaller than json

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •