mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-21 04:52:00 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
16
odoo-bringout-oca-ocb-bus/bus/tools/orjson.py
Normal file
16
odoo-bringout-oca-ocb-bus/bus/tools/orjson.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
try:
|
||||
import orjson
|
||||
|
||||
def dumps(value):
|
||||
return orjson.dumps(value)
|
||||
|
||||
def loads(value):
|
||||
return orjson.loads(value)
|
||||
except ImportError:
|
||||
import json
|
||||
|
||||
def dumps(value):
|
||||
return json.dumps(value, separators=(",", ":")).encode()
|
||||
|
||||
def loads(value):
|
||||
return json.loads(value)
|
||||
Loading…
Add table
Add a link
Reference in a new issue