mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Prevent to serialize text as date when rapidjson is used
This commit is contained in:
parent
cb4f459597
commit
f8d255b353
1 changed files with 2 additions and 4 deletions
|
|
@ -21,13 +21,11 @@ for json_lib in (RAPIDJSON, UJSON):
|
|||
|
||||
if mode == RAPIDJSON:
|
||||
def dumps(data):
|
||||
return json.dumps(data, ensure_ascii=False, number_mode=json.NM_NATIVE,
|
||||
datetime_mode=json.DM_ISO8601 | json.DM_NAIVE_IS_UTC)
|
||||
return json.dumps(data, ensure_ascii=False)
|
||||
|
||||
|
||||
def loads(data):
|
||||
return json.loads(data, number_mode=json.NM_NATIVE,
|
||||
datetime_mode=json.DM_ISO8601 | json.DM_NAIVE_IS_UTC)
|
||||
return json.loads(data, number_mode=json.NM_NATIVE)
|
||||
|
||||
elif mode == UJSON:
|
||||
def loads(data):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue