box/box_list.py
def from_json(
        cls,
        json_string: str = None,
        filename: Union[str, PathLike] = None,
        encoding: str = "utf-8",
        errors: str = "strict",
        multiline: bool = False,
        **kwargs,
    ):
        """
        Transform a json object string into a BoxList object. If the incoming
        json is a dict, you must use Box.from_json.

        :param json_string: string to pass to `json.loads`
        :param filename: filename to open and pass to `json.load`
        :param encoding: File encoding
        :param errors: How to handle encoding errors
        :param multiline: One object per line
        :param kwargs: parameters to pass to `Box()` or `json.loads`
        :return: BoxList object from json data
        """
        box_args = {}
        for arg in list(kwargs.keys()):
            if arg in BOX_PARAMETERS:
                box_args[arg] = kwargs.pop(arg)

        data = _from_json(
            json_string, filename=filename, encoding=encoding, errors=errors, multiline=multiline, **kwargs
        )

        if not isinstance(data, list):
            raise BoxError(f"json data not returned as a list, but rather a {type(data).__name__}")
        return cls(data, **box_args)

        Transform a json object string into a BoxList object. If the incoming
        json is a dict, you must use Box.from_json.

        :param json_string: string to pass to `json.loads`
        :param filename: filename to open and pass to `json.load`
        :param encoding: File encoding
        :param errors: How to handle encoding errors
        :param multiline: One object per line
        :param kwargs: parameters to pass to `Box()` or `json.loads`
        :return: BoxList object from json data
        
Transform a json object string into a BoxList object. If the incoming
json is a dict, you must use Box.from_json.
Transform a json object string into a BoxList object . If the incoming json is a dict you must use Box . from_json .
def from_json(
        cls,
        json_string: str = None,
        filename: Union[str, PathLike] = None,
        encoding: str = "utf-8",
        errors: str = "strict",
        multiline: bool = False,
        **kwargs,
    ):
        box_args = {}
        for arg in list(kwargs.keys()):
            if arg in BOX_PARAMETERS:
                box_args[arg] = kwargs.pop(arg)
        data = _from_json(
            json_string, filename=filename, encoding=encoding, errors=errors, multiline=multiline, **kwargs
        )
        if not isinstance(data, list):
            raise BoxError(f"json data not returned as a list, but rather a {type(data).__name__}")
        return cls(data, **box_args)
def from_json ( cls , json_string : str = None , filename : Union [ str , PathLike ] = None , encoding : str = "utf-8" , errors : str = "strict" , multiline : bool = False , ** kwargs , ) : box_args = { } for arg in list ( kwargs . keys ( ) ) : if arg in BOX_PARAMETERS : box_args [ arg ] = kwargs . pop ( arg ) data = _from_json ( json_string , filename = filename , encoding = encoding , errors = errors , multiline = multiline , ** kwargs ) if not isinstance ( data , list ) : raise BoxError ( f"json data not returned as a list, but rather a {type(data).__name__}" ) return cls ( data , ** box_args )
Transform a json object string into a BoxList object.
Transform a json object string into a BoxList object .
"""
        Transform a json object string into a BoxList object. If the incoming
        json is a dict, you must use Box.from_json.

        :param json_string: string to pass to `json.loads`
        :param filename: filename to open and pass to `json.load`
        :param encoding: File encoding
        :param errors: How to handle encoding errors
        :param multiline: One object per line
        :param kwargs: parameters to pass to `Box()` or `json.loads`
        :return: BoxList object from json data
        """
BoxList object from json data
BoxList object from json data
cls
json_string
str
string to pass to `json.loads`
string to pass to ` json . loads `
filename
Union[str, PathLike]
filename to open and pass to `json.load`
filename to open and pass to ` json . load `
encoding
str
None
errors
str
None
multiline
bool
One object per line
One object per line
kwargs
parameters to pass to `Box()` or `json.loads`
parameters to pass to ` Box () ` or ` json . loads `