write_strict_json
Documentation for eth_defi.vault.top_vaults_json.write_strict_json function.
- write_strict_json(path, payload, *, validated=False)
Atomically write validated JSON, preferring the existing
orjsondependency.Standard JSON handles a few values that
orjsondoes not, notably integers wider than 64 bits. Fall back only when the faster encoder rejects an otherwise valid payload; preserve the old output contract.- Parameters
path (pathlib.Path) – Destination JSON path.
payload (dict) – JSON object to write.
validated (bool) – Caller has already run strict path-aware validation.
- Returns
Noneafter replacing the file atomically.- Return type
None