def loads(s: str, **kwargs) -> JsonObj:
    """ Convert a json_str into a JsonObj

    :param s: a str instance containing a JSON document
    :param kwargs: arguments see: json.load for details
    :return: JsonObj representing the json string
    """
    if isinstance(s, (bytes, bytearray)):
        s = s.decode(json.detect_encoding(s), 'surrogatepass')
    return json.loads(s, object_hook=lambda pairs: JsonObj(**pairs), **kwargs)
def loads ( s : str , ** kwargs ) -> JsonObj : if isinstance ( s , ( bytes , bytearray ) ) : s = s . decode ( json . detect_encoding ( s ) , 'surrogatepass' ) return json . loads ( s , object_hook = lambda pairs : JsonObj ( ** pairs ) , ** kwargs )
Convert a json_str into a JsonObj

    :param s: a str instance containing a JSON document
    :param kwargs: arguments see: json.load for details
    :return: JsonObj representing the json string