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