mirror of
https://github.com/pocketpy/pocketpy
synced 2026-03-21 20:50:16 +00:00
Compare commits
2 Commits
02c91d863f
...
68f8d62ef0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68f8d62ef0 | ||
|
|
f6c6a48de4 |
@ -5,6 +5,16 @@ label: json
|
||||
|
||||
JSON serialization and deserialization module.
|
||||
|
||||
This module is not safe. You may not want to use it with untrusted data.
|
||||
If you need a safe alternative, consider a 3rd-party library like `cjson`.
|
||||
|
||||
You can override the json functions with:
|
||||
```c
|
||||
py_GlobalRef mod = py_getmodule("json");
|
||||
py_bindfunc(mod, "loads", _safe_json_loads);
|
||||
py_bindfunc(mod, "dumps", _safe_json_dumps);
|
||||
```
|
||||
|
||||
#### Source code
|
||||
|
||||
:::code source="../../include/typings/json.pyi" :::
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user