Compare commits

..

1 Commits

2 changed files with 1 additions and 13 deletions

View File

@ -104,9 +104,7 @@ static bool mpack_write_dict_kv(py_Ref k, py_Ref v, void* ctx) {
if(k->type != tp_str) return TypeError("msgpack: key must be strings");
c11_sv sv = py_tosv(k);
mpack_write_str(writer, sv.data, (size_t)sv.size);
bool ok = py_to_mpack(v, writer);
if(!ok) mpack_write_nil(writer);
return ok;
return py_to_mpack(v, writer);
}
static bool py_to_mpack(py_Ref object, mpack_writer_t* writer) {

View File

@ -5,16 +5,6 @@ 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" :::