The braces, commas and colons, and the quoting of the member name are required;
the spaces are optional.
Matching of the key against the member names is done case-sensitively.
+If a returned value is a JSON string, it retains its leading and
+trailing quotes.
. XXX should be a UTF-8 compare
The results of matching are handled as above.
Field selection and result handling is as above;
there is no choice of field separator.
+If a returned value is a JSON string, it retains its leading and
+trailing quotes.
.wen
}
while (field_number > 0 && (item = json_nextinlist(&list)))
field_number--;
- s = item;
- lookup_value = s;
- while (*s) s++;
- while (--s >= lookup_value && isspace(*s)) *s = '\0';
+ if ((lookup_value = s = item))
+ {
+ while (*s) s++;
+ while (--s >= lookup_value && isspace(*s)) *s = '\0';
+ }
}
else
{
${extract json{IDs}{ \{"id": \{"a":101, "b":102\}, "IDs": \{"1":116, "2":943, "3":234\}\} }}
expect: {"1":116, "2":943, "3":234}
+<${extract json{nonexistent}{ \{"id": \{"a":101, "b":102\}, "IDs": \{"1":116, "2":943, "3":234\}\} }}>
+expect: <>
+
****
# Test "escape" with print_topbitchars
exim -be -DPTBC=print_topbitchars
> {"1":116, "2":943, "3":234}
> expect: {"1":116, "2":943, "3":234}
>
+> <>
+> expect: <>
+>
>
> escape: B7·F2ò
>