code: 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)
docs: 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