Core: added json parser

An event-driven JSON parser implementing the grammar of RFC 8259.
The full grammar is recognized: objects, arrays, strings with \uXXXX
escapes (including UTF-16 surrogate pairs), numbers, and the
true/false/null literals.  Tokens are reported to a caller-supplied
handler, with nesting bounded by a configurable maximum depth.

Based on previous work by Maxim Dounin.

Co-authored-by: Dmitry Volyntsev <d.volyntsev@f5.com>
This commit is contained in:
Roman SemenovandDmitry Volyntsev authored and Roman S committed 2026-08-24 11:08:31 -07:00
1 parent bc1cb5686b
commit 746609903e
3 files changed
+944

No files matched your search

+2
View File
@@ -43,6 +43,7 @@ CORE_DEPS="src/core/nginx.h \
src/core/ngx_crypt.h \
src/core/ngx_data.h \
src/core/ngx_json.h \
src/core/ngx_json_parse.h \
src/core/ngx_json_unescape.h \
src/core/ngx_proxy_protocol.h \
src/core/ngx_syslog.h"
@@ -84,6 +85,7 @@ CORE_SRCS="src/core/nginx.c \
src/core/ngx_crypt.c \
src/core/ngx_data.c \
src/core/ngx_json.c \
src/core/ngx_json_parse.c \
src/core/ngx_json_unescape.c \
src/core/ngx_proxy_protocol.c \
src/core/ngx_syslog.c"