code wiki / _hdl_build / nx_json_lib.nx

nx_json_lib.nx

buildroot/runtime/_hdl_build/nx_json_lib.nx

16450 B340 linesdepth 2pulls 2 transitivereach 142 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 · 23 importers

nx_syscalls.nx nx_json_lib.nx nx_4chan.nx nx_bindings_delivery_gate.nx nx_formatlaw.nx nx_issue_intake_candidate_t181.nx nx_lsp.nx nx_mcp.nx nx_mcp_route.nx nx_measurement_binding_artifact_ga nx_sota_bindings_differential_gate nx_swcompare_evidence_lib_t138.nx

diagram shows first 10 each side; +0 more imports, +13 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_4chan.nxnx_bindings_delivery_gate.nxnx_formatlaw.nxnx_issue_intake_candidate_t181.nxnx_lsp.nxnx_mcp.nxnx_mcp_route.nxnx_measurement_binding_artifact_gate.nxnx_sota_bindings_differential_gate.nxnx_swcompare_evidence_lib_t138.nxnx_swcompare_lib.nxnx_tools_api.nxnx_tools_api_candidate_t182.nxnx_tools_api_canonical_candidate_t182.nxnx_tools_api_idem_candidate_t190.nxnx_tools_api_recovery_candidate_t316.nxnx_tools_api_recovery_candidate_v2_t316.nxnx_tools_api_recovery_candidate_v3_t316.nxnx_work_predict_lib.nxnx_worklog_ingest_lib.nxnx_world_telemetry.nxnx_world_telemetry_gpu_candidate.nxnx_world_telemetry_v2_candidate.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
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