src/nitpick/fields.py
def is_valid_json(json_string: str) -> bool:
    """Validate the string as JSON."""
    try:
        json.loads(json_string)
    except json.JSONDecodeError as err:
        raise ValidationError(pretty_exception(err, "Invalid JSON")) from err
    return True
Validate the string as JSON.
Validate the string as JSON.
Validate the string as JSON .
def is_valid_json(json_string: str) -> bool:
    try:
        json.loads(json_string)
    except json.JSONDecodeError as err:
        raise ValidationError(pretty_exception(err, "Invalid JSON")) from err
    return True
def is_valid_json ( json_string : str ) -> bool : try : json . loads ( json_string ) except json . JSONDecodeError as err : raise ValidationError ( pretty_exception ( err , "Invalid JSON" ) ) from err return True
Validate the string as JSON.
Validate the string as JSON .
"""Validate the string as JSON."""
json_string
str