nirs4all.api.inspector_json module

JSON-safe values shared by result views and the isolated document host.

nirs4all.api.inspector_json.sanitize_dict(d: dict[str, Any]) → dict[str, Any][source]

Preserve timestamps and recursively encode non-finite values as null.

nirs4all.api.inspector_json.sanitize_float(value: Any) → Any[source]

Convert NaN / Inf floats to None; pass every other value through.