2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-03 15:35:17 +00:00

[#2084] doc warning about using extended JSON features

This commit is contained in:
Andrei Pavel
2021-12-14 18:42:20 +02:00
parent bbfb0a5b35
commit b3957c688e
2 changed files with 11 additions and 5 deletions

View File

@@ -65,11 +65,12 @@ means that some trickery with escaping double quotes will be involved. Note
there is no need to escape any other character, unless you want to specify there is no need to escape any other character, unless you want to specify
non-printable characters. non-printable characters.
Also, while Kea's JSON parser supports comments and multi-line string, they Also, while Kea's JSON parser supports comments, multi-line strings and extra
are not part of JSON standard. That means that external tools, such as python commas, they are not part of JSON standard. That means that external tools, such
or Sphinx parsers are not able to deal with them. Therefore comments must as python or Sphinx parsers are not able to deal with them. Therefore comments
be removed and long strings (such as command descriptions or example invocations) and extra commas must be removed. Long strings (such as command descriptions or
are to be presented as a list of strings ( e.g. [ "line1", "line2, "line3" ]). example invocations) are to be presented as a list of strings
e.g. [ "line1", "line2, "line3" ].
@section docsDevelGuide Generating Developer's Guide @section docsDevelGuide Generating Developer's Guide

View File

@@ -58,6 +58,11 @@ Kea components use extended JSON with additional features allowed:
with the location of the comma to give the user the ability to correct a with the location of the comma to give the user the ability to correct a
potential mistake. potential mistake.
.. warning::
These features are meant to be used in a JSON configuration. Their usage in
any other way may result in errors.
The configuration file consists of a single object (often colloquially The configuration file consists of a single object (often colloquially
called a map) started with a curly bracket. It comprises only one of called a map) started with a curly bracket. It comprises only one of
the "Dhcp4", "Dhcp6", "DhcpDdns", "Control-agent", or "Netconf" objects. the "Dhcp4", "Dhcp6", "DhcpDdns", "Control-agent", or "Netconf" objects.