Mercurial > hgrepos > Python > libs > ConfigMix
diff doc/introduction.rst @ 145:d44ee758e31b
Some docu on comments in files
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Fri, 13 Apr 2018 21:44:42 +0200 |
| parents | fc2bd73f9e98 |
| children | ab6a48ff5235 |
line wrap: on
line diff
--- a/doc/introduction.rst Fri Apr 13 09:51:02 2018 +0200 +++ b/doc/introduction.rst Fri Apr 13 21:44:42 2018 +0200 @@ -45,15 +45,13 @@ into a Python :class:`dict` alike. This is checked by the implementation. -.. todo:: Handle JSON comments by special attributes which will - filtered out on further processing. Javascript comments are - not allowed by the JSON specification. - An example is: .. literalinclude:: ../tests/data/conf10.json :language: js +For comments in JSON files see section :ref:`comments`. + .. _ini-files: @@ -203,6 +201,19 @@ ``[namespace:]variable``. +.. _comments: + +Comments +-------- + +By default all keys beginning with ``__comment`` or ``__doc`` are +filtered out and not given to the application. This allows comments in +JSON files -- but is not restricted to JSON files only. + +For all types of configuration files their respective standard comments +are allowed too. + + .. _variable-namespaces: Variable Namespaces
