]> git.ipfire.org Git - thirdparty/bind9.git/commit
chg: dev: Stop prettifying JSON statistics
authorMichał Kępień <michal@isc.org>
Mon, 27 Oct 2025 09:57:58 +0000 (10:57 +0100)
committerMichał Kępień <michal@isc.org>
Mon, 27 Oct 2025 09:57:58 +0000 (10:57 +0100)
commit90408b813ddaac76776b5a53241ee2cf4ceb3602
tree438d489cfd9b2514e499595f40c045346ef4b1b3
parent3219874fe7abe2396a79b5f3f3c4d6c83d3351cb
parent4797b2a1553a9fe32bd17fa20173fce24e280559
chg: dev: Stop prettifying JSON statistics

Passing the JSON_C_TO_STRING_PRETTY flag to
json_object_to_json_string_ext() makes the latter produce prettified
JSON output.  This results in a huge amount of redundant whitespace
being inserted into each HTTP response (whitespace amounts to about 40%
of the entire JSON payload).

The bandwidth cost can be amortized by enabling HTTP compression on the
client side ("Accept-Encoding: deflate"), but that does not affect the
size of data at rest.

Use the JSON_C_TO_STRING_PLAIN flag instead of JSON_C_TO_STRING_PRETTY
to minimize the size of JSON responses sent via the statistics channel.
External tools should be used for prettifying JSON data.

Closes #3304

Merge branch '3304-stop-prettifying-json-statistics' into 'main'

See merge request isc-projects/bind9!10786