json5 / json5-spec

The JSON5 Data Interchange Format
https://spec.json5.org
MIT License
49 stars 11 forks source link

Replace mandatory braces with indentation #41

Closed ioggstream closed 1 year ago

ioggstream commented 2 years ago

Dear folks, removing mandatory quoting and comments are great!

{
  // comments
  unquoted: 'and you can quote me on that',
  singleQuotes: 'I can use "double quotes" here',
  trailingComma: 'in objects', andIn: ['arrays',],
}

What do you think about replacing mandatory braces with indentation? This will make "nested objects for humans"! Brackets can be replaced with some sort of prefix, like -

e.g.

// comments
unquoted: 'and you can quote me on that'
singleQuotes: 'I can use "double quotes" here'
trailingComma: 'in objects',
andIn: 
- 'arrays'

WDYT?

jordanbtucker commented 2 years ago

This looks a lot like YAML.