# HG changeset patch # User Franz Glasner # Date 1523648682 -7200 # Node ID d44ee758e31b25a6c22285724cd73643e62e7e9b # Parent 7e6ec99d5ff542d337123c645ec5a06bbc5c75c2 Some docu on comments in files diff -r 7e6ec99d5ff5 -r d44ee758e31b doc/introduction.rst --- 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