Loading behave_utils/json.py +6 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ class JSONObject(JSONPathMixin, dict[str, Any]): @classmethod def from_string(cls: type[T], string: bytes) -> T: """ Create a JSONObject from a JSON string """ return cls(json.loads(string)) Loading @@ -65,4 +68,7 @@ class JSONArray(JSONPathMixin, list[Any]): @classmethod def from_string(cls: type[T], string: bytes) -> T: """ Create a JSONArray from a JSON string """ return cls(json.loads(string)) Loading
behave_utils/json.py +6 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ class JSONObject(JSONPathMixin, dict[str, Any]): @classmethod def from_string(cls: type[T], string: bytes) -> T: """ Create a JSONObject from a JSON string """ return cls(json.loads(string)) Loading @@ -65,4 +68,7 @@ class JSONArray(JSONPathMixin, list[Any]): @classmethod def from_string(cls: type[T], string: bytes) -> T: """ Create a JSONArray from a JSON string """ return cls(json.loads(string))