nginx/auto
Roman Semenov a1f4a61769 Added the json parser module
Added the http_json_module with a json_set directive that
extracts values from JSON stored in nginx variables and exposes them
as new nginx variables.  Parsed results are cached per request, so
multiple json_set directives using the same source expression trigger
only one parse.  The directive is available in the http main context.

Example usage:

    http {
        json_set $user_name $arg_data user.name;
        json_set $user_age  $arg_data user.age;
        json_set $tag0      $arg_data tags[0];

        server {
            listen 8080;

            location / {
                return 200 "name=$user_name age=$user_age "
                           "tag0=$tag0\n";
            }
        }

        # quoted keys for names containing '.', '[', ']', or that
        # are empty; the whole argument is single-quoted so that the
        # inner '"' reach the path parser intact
        json_set $host      $arg_data '["a.b.com"]';
        json_set $nested    $arg_data 'obj["a.b"].c[2]';
        json_set $quoted    $arg_data 'obj["a\\"b"]';
    }

Co-authored-by: Dmitry Volyntsev <d.volyntsev@f5.com>
2026-08-24 11:08:31 -07:00
..
cc Configure: fix gcc version detection in some corner cases 2026-05-01 22:43:35 +01:00
lib Configure: MSVC compatibility with PCRE2 10.47. 2025-11-06 15:34:58 +04:00
os Configure: set cache line size for loongarch64 2026-06-23 15:24:27 +01:00
types Configure: stop polluting NGX_ namespace. 2016-06-27 15:00:06 -07:00
configure Win32: i386 now assumed when crossbuilding (ticket #2416). 2023-02-23 18:15:59 +03:00
define
endianness Configure: fix build with -Werror=old-style-definition. 2016-06-27 15:00:05 -07:00
feature Configure: fix build with -Werror=old-style-definition. 2016-06-27 15:00:05 -07:00
have
have_headers
headers
include Configure: stop polluting NGX_ namespace. 2016-06-27 15:00:06 -07:00
init Configure: marked top-level make targets as phony. 2021-02-20 12:44:26 +03:00
install Configure: fixed "make install" when cross-compiling to Windows. 2024-02-26 20:00:46 +00:00
make Configure: ordered directories. 2021-09-21 14:46:25 +03:00
module Configure: shared sources for addon modules. 2020-11-10 17:13:20 +03:00
modules Added the json parser module 2026-08-24 11:08:31 -07:00
nohave
options Added the json parser module 2026-08-24 11:08:31 -07:00
sources Core: added json parser 2026-08-24 11:08:31 -07:00
stubs
summary PCRE2 library support. 2021-12-25 01:07:15 +03:00
threads Configure: fixed static compilation with OpenSSL 1.1.1. 2018-03-22 15:55:57 +03:00
unix Configure: include crypt.h for crypt() feature tests 2026-07-15 15:02:04 +04:00