parameters: (json_text: str)
docstring: Does the same as json.loads, but with some additional validation.
docstring_summary: Does the same as json.loads, but with some additional validation.
docstring_tokens: Does the same as json . loads but with some additional validation .
function: def json_loads(json_text: str) -> Any:
    """Does the same as json.loads, but with some additional validation."""
    try:
      json_data = json.loads(json_text)
      validate_all_strings(json_data)
      return json_data
    except json.decoder.JSONDecodeError:
      raise _jwt_error.JwtInvalidError('Failed to parse JSON string')
    except RecursionError:
      raise _jwt_error.JwtInvalidError(
          'Failed to parse JSON string, too many recursions')
    except UnicodeEncodeError:
      raise _jwt_error.JwtInvalidError('invalid character')
function_tokens: def json_loads ( json_text : str ) -> Any : try : json_data = json . loads ( json_text ) validate_all_strings ( json_data ) return json_data except json . decoder . JSONDecodeError : raise _jwt_error . JwtInvalidError ( 'Failed to parse JSON string' ) except RecursionError : raise _jwt_error . JwtInvalidError ( 'Failed to parse JSON string, too many recursions' ) except UnicodeEncodeError : raise _jwt_error . JwtInvalidError ( 'invalid character' )