AQIT 0.1.0
Loading...
Searching...
No Matches
aquin.engine.json_safe Namespace Reference

Functions

Any sanitize_jsonable (Any obj)
str dumps_json_safe (Any obj, **Any kwargs)

Function Documentation

◆ dumps_json_safe()

str dumps_json_safe ( Any obj,
**Any kwargs )
json.dumps with NaN/Inf stripped so receivers always get strict JSON.

Definition at line 36 of file json_safe.py.

References sanitize_jsonable().

◆ sanitize_jsonable()

Any sanitize_jsonable ( Any obj)
Recursively replace non-finite floats with None; pass through the rest.

Definition at line 18 of file json_safe.py.

References sanitize_jsonable().

Referenced by dumps_json_safe(), and sanitize_jsonable().