mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-14 19:00:23 +00:00
16 lines
203 B
Python
16 lines
203 B
Python
try:
|
|
import ujson as json
|
|
|
|
IS_UJSON = True
|
|
except ImportError:
|
|
import json
|
|
|
|
IS_UJSON = False
|
|
|
|
|
|
def dumps(data):
|
|
return json.dumps(data)
|
|
|
|
|
|
def loads(data):
|
|
return json.loads(data)
|