json5 / json5-spec

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

feature-request: Multi 'chunk' string literals like: "abc" "def" #9

Closed msokalski closed 4 years ago

msokalski commented 5 years ago

One thing I like in C/C++ is ability to code string literals in multiple lines while keeping indentation. Currently with JSON5 best we can do is to use back-slashes which kill indentation:

{
    text: "Dobra dobra \
zupa z bobra."
}

What I'd love to see in JSON5 is:

{
    text: "Dobra dobra "
          "zupa z bobra."
}

Limiting it to be not allowed on object's keys would be fine for me.

msokalski commented 5 years ago
jordanbtucker commented 5 years ago

See also https://github.com/json5/json5/issues/106 and https://github.com/json5/json5/pull/111