Skip to content

Commit f9ee328

Browse files
author
Evan Roman
committed
formatting
1 parent 1172610 commit f9ee328

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

azure/functions/_jsonutils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ def dumps(self, obj) -> str:
1111
def loads(self, s: str):
1212
pass
1313

14+
1415
class OrJsonAdapter(JsonInterface):
1516
def __init__(self):
16-
import orjson
17-
self.orjson = orjson
17+
import orjson
18+
self.orjson = orjson
1819

1920
def dumps(self, obj) -> str:
2021
return self.orjson.dumps(obj).decode("utf-8")
@@ -55,16 +56,19 @@ def loads(self, s: str):
5556
except ImportError:
5657
continue
5758

59+
5860
def dumps(obj, **kwargs) -> str:
5961
if json_impl is None:
6062
raise ImportError("No JSON adapter found")
6163
return json_impl.dumps(obj, **kwargs)
6264

65+
6366
def loads(s: str):
6467
if json_impl is None:
6568
raise ImportError("No JSON adapter found")
6669
return json_impl.loads(s)
6770

71+
6872
json = types.SimpleNamespace(
6973
dumps=dumps,
7074
loads=loads

0 commit comments

Comments
 (0)