X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3.github.io;a=blobdiff_plain;f=docs%2Flayout-saving.html;fp=docs%2Flayout-saving.html;h=cddd5827d792e05e643425d93f3df872c6d0c00d;hp=f97f2ce43096fc36f24ac6eecf46a1a8057c4693;hb=6316c876a2ac2e6d695cfcfd20bc51da7482f40b;hpb=052c1aa4a26fa984b7433c00adc06e0e468c44b7 diff --git a/docs/layout-saving.html b/docs/layout-saving.html index f97f2ce..cddd582 100644 --- a/docs/layout-saving.html +++ b/docs/layout-saving.html @@ -4,7 +4,7 @@ - + i3: Layout saving in i3 @@ -253,18 +253,20 @@ the window which matches any of the criteria. As an example:

  1. -Layout files contain multiple “JSON documents” on the top level, whereas the - JSON standard only allows precisely one “document” (array or hash). +Layout files contain multiple “JSON texts” at the top level. The JSON + standard doesn’t prohibit this, but in practice most JSON parsers only + allow precisely one “text” per document/file, and will mark multiple texts + as invalid JSON.

  2. -Layout files contain comments which are not standardized, but understood by - many parsers. +Layout files contain comments which are not allowed by the JSON standard, + but are understood by many parsers.

-

Both deviations from the JSON standard are to make manual editing by humans +

Both of these deviations from the norm are to make manual editing by humans easier. In case you are writing a more elaborate tool for manipulating these layouts, you can either use a JSON parser that supports these deviations (for example libyajl), transform the layout file to a JSON-conforming file, or