summaryrefslogtreecommitdiff
path: root/doc/doc-docbook/spec.xfpt
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2019-02-09 16:48:08 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2019-02-11 00:15:39 +0000
commitffc92d69bf2618aca35f2c523abde0a76657e3a2 (patch)
tree07651643a7aa35b4375a081e56c8245c8eefdeef /doc/doc-docbook/spec.xfpt
parentb53c265b5c7825d7fb6bb672547c44d080459d71 (diff)
JSON lookup
(cherry picked from commits 854bd65fa7, 11b31159ac, 19cb5e2f14, 9669c6e06f, 6db8b72c86)
Diffstat (limited to 'doc/doc-docbook/spec.xfpt')
-rw-r--r--doc/doc-docbook/spec.xfpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 958e7caf6..46cab7c58 100644
--- a/doc/doc-docbook/spec.xfpt
+++ b/doc/doc-docbook/spec.xfpt
@@ -6742,6 +6742,24 @@ lookup types support only literal keys.
the implicit key is the host's IP address rather than its name (see section
&<<SECThoslispatsikey>>&).
.next
+.new
+.cindex lookup json
+.cindex json "lookup type"
+.cindex JSON expansions
+&(json)&: The given file is a text file with a JSON structure.
+An element of the structure is extracted, defined by the search key.
+The key is a list of subelement selectors
+(colon-separated by default but changeable in the usual way)
+which are applied in turn to select smaller and smaller portions
+of the JSON structure.
+If a selector is numeric, it must apply to a JSON array; the (zero-based)
+nunbered array element is selected.
+Otherwise it must apply to a JSON object; the named element is selected.
+The final resulting object can be a simple JSOM type or a JSON object
+or array; for the latter two a string-representation os the JSON
+is returned.
+.wen
+.next
.cindex "linear search"
.cindex "lookup" "lsearch"
.cindex "lsearch lookup type"