]> git.kaiwu.me - haproxy.git/commitdiff
DOC: config: mention the nesting limit of the json_query() converter
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 25 Nov 2026 16:17:13 +0000 (17:17 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 25 Nov 2026 16:04:05 +0000 (17:04 +0100)
The JSON parser does not process documents nested deeper than 20 levels
(MJSON_MAX_DEPTH), so json_query() and the converters relying on it
find nothing located after an element nested deeper than that. Let's
mention it next to the other known limitations of this converter.

This may be backported to all supported versions.

doc/configuration.txt

index fd50e19b276c60a61ee8d4673bfd461661eec9b7..75b72c49e0a4674393d357bae47931f40c6dbad8 100644 (file)
@@ -23293,8 +23293,10 @@ json_query(<json_path>[,<output_type>])
   Note: depending on the context and the underlying implementation, extraction
         of duplicate JSON keys is undefined and might return the first, last,
         or any other occurrence of the same key from the input content, and if
-        key names are passed encoded, they might not always be matched. In
-        short, this converter is not suitable for content sanitization.
+        key names are passed encoded, they might not always be matched. The
+        parser also stops at elements nested deeper than 20 levels, and nothing
+        located after such an element is found. In short, this converter is
+        not suitable for content sanitization.
 
   Example:
      # get a integer value from the request body