Skip to content

Commit ef6de6f

Browse files
committed
Add args/kwargs to StacIO.read_json
1 parent 8946c9b commit ef6de6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pystac/stac_io.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ def stac_object_from_dict(
102102
result._stac_io = self
103103
return result
104104

105-
def read_json(self, source: Union[str, "Link_Type"]) -> Dict[str, Any]:
105+
def read_json(
106+
self, source: Union[str, "Link_Type"], *args: Any, **kwargs: Any
107+
) -> Dict[str, Any]:
106108
"""Read a dict from the given source.
107109
108110
See :func:`StacIO.read_text <pystac.StacIO.read_text>` for usage of
@@ -115,7 +117,7 @@ def read_json(self, source: Union[str, "Link_Type"]) -> Dict[str, Any]:
115117
dict: A dict representation of the JSON contained in the file at the
116118
given source.
117119
"""
118-
txt = self.read_text(source)
120+
txt = self.read_text(source, *args, **kwargs)
119121
return self._json_loads(txt, source)
120122

121123
def read_stac_object(

0 commit comments

Comments
 (0)