Skip to content

Commit

Permalink
Merge pull request #542 from l0b0/chore/remove-unused-parameters-recu…
Browse files Browse the repository at this point in the history
…rsively

chore: Remove unused parameters recursively
  • Loading branch information
Jon Duckworth authored Jul 15, 2021
2 parents 77f203e + 86d9f19 commit c8582de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pystac/stac_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def json_loads(self, txt: str, *args: Any, **kwargs: Any) -> Dict[str, Any]:
if orjson is not None:
result = orjson.loads(txt)
else:
result = json.loads(txt)
result = json.loads(txt, *args, **kwargs)
return result

def json_dumps(self, json_dict: Dict[str, Any], *args: Any, **kwargs: Any) -> str:
Expand All @@ -115,9 +115,11 @@ def json_dumps(self, json_dict: Dict[str, Any], *args: Any, **kwargs: Any) -> st
json_dict : The dictionary to serialize
"""
if orjson is not None:
return orjson.dumps(json_dict, option=orjson.OPT_INDENT_2).decode("utf-8")
return orjson.dumps(json_dict, option=orjson.OPT_INDENT_2, **kwargs).decode(
"utf-8"
)
else:
return json.dumps(json_dict, indent=2)
return json.dumps(json_dict, *args, indent=2, **kwargs)

def stac_object_from_dict(
self,
Expand Down

0 comments on commit c8582de

Please sign in to comment.