json_mlake ยท API

json.cpu

Functions

parse_cpu_native_tape

def parse_cpu_native_tape[force_scalar: Bool = False](var s: String) -> Value

Two-pass CPU parser that returns a tape-backed Value view.

Stage 1 finds structural positions (SIMD by default; scalar with force_scalar=True); stage 2 walks the resulting index and emits a Document whose root is wrapped as a Value view. Reads (is_*, *_value, array_count, __getitem__, etc.) hit the tape directly; mutations materialise into a temporary owned tree and rebuild the document transparently.

Parameters
force_scalar: SIMD vs scalar stage 1 (default SIMD).
Args
s: JSON input string. The returned Value's document owns this string.