Skip to content

Commit f2a1d15

Browse files
p1-alexandrevaneyp1-ra
authored andcommitted
add json loading to data_loader
1 parent 5c4b502 commit f2a1d15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

openapi_python_client/resolver/data_loader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import yaml
2+
import json
23

34
from .resolver_types import SchemaData
45

@@ -15,7 +16,7 @@ def load(cls, path: str, data: bytes) -> SchemaData:
1516

1617
@classmethod
1718
def load_json(cls, data: bytes) -> SchemaData:
18-
raise NotImplementedError()
19+
return json.loads(data)
1920

2021
@classmethod
2122
def load_yaml(cls, data: bytes) -> SchemaData:

0 commit comments

Comments
 (0)