code wiki / _hdl_build / nx_json_lib_route_t160.nx

nx_json_lib_route_t160.nx

buildroot/runtime/_hdl_build/nx_json_lib_route_t160.nx

16450 B340 linesdepth 2pulls 2 transitivereach 6 importersview sourcekind librarytopic json
docsdependenciesstructsconstsfunctions

about

nx_json_lib.nx -- minimal SOVEREIGN JSON field reader (no jq, no shell, no 3rd-party). Built for the work-journal: extract "transcript_path" from a Claude-Code hook's stdin JSON and scan tool_use blocks out of the session transcript .jsonl. NOT a full JSON parser -- it linearly finds "key":"value" string fields and literal anchors, which is exactly what capture needs and is robust to the harness's compact (space-free) emission. De-escapes backslash sequences and neutralizes any TAB/NL/CR so an extracted value can never tear the TSV work-journal line. Sovereign: imports nx_syscalls only. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_json_lib_route_t160.nx nx_forge_evidence_t274.nx nx_mcp_route_json_t160.nx

imports: nx_syscalls.nx

imported by: nx_forge_evidence_t274.nxnx_mcp_route_json_t160.nx

structs

none

consts

none

functions

10func jx_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
13func jx_find(buf: *u8, n: i64, start: i64, pat: *u8) -> i64
29func jx_hexdig(buf: *u8, n: i64, at: i64) -> i64
called by 1: jx_hex4
39func jx_hex4(buf: *u8, n: i64, at: i64) -> i64
called by 1: jx_copy_str_ctl calls 1: jx_hexdig
52func jx_emit_utf8(out: *u8, o0: i64, outcap: i64, cp: i64) -> i64
called by 1: jx_copy_str_ctl
92func jx_utf8_scalar_width(buf: *u8, n: i64, at: i64) -> i64
called by 1: jx_copy_str_ctl
114func jx_copy_str_ctl(buf: *u8, n: i64, vstart: i64, out: *u8, outcap: i64, keep_ctl: i64) -> i64
218func jx_decode_span(buf:*u8,n:i64,out:*u8,outcap:i64)->i64
223func jx_copy_str_argv(buf: *u8, n: i64, vstart: i64, out: *u8, outcap: i64) -> i64
calls 1: jx_copy_str_ctl
227func jx_copy_str(buf: *u8, n: i64, vstart: i64, out: *u8, outcap: i64) -> i64
called by 1: jx_get_str calls 1: jx_copy_str_ctl
230func jx_copy_str_raw(buf: *u8, n: i64, vstart: i64, out: *u8, outcap: i64) -> i64
called by 1: jx_get_str_raw calls 1: jx_copy_str_ctl
237func jx_skip_ws(buf: *u8, n: i64, from: i64) -> i64
258func jx_get_int(buf: *u8, n: i64, start: i64, key: *u8, out_val: *i64) -> i64
293func jx_get_str(buf: *u8, n: i64, start: i64, key: *u8, out: *u8, outcap: i64) -> i64
320func jx_get_str_raw(buf: *u8, n: i64, start: i64, key: *u8, out: *u8, outcap: i64) -> i64