from typing import Any
import json


def is_serializable(x: Any) -> bool:
    """
    Checks if x is serializable to JSON,
    tries to execute ``json.dumps(x)``.

    Parameters
    ----------
    x : Any
        Object to check

    Returns
    -------
    bool
        Whether the object is serializable
    """

    try:
        json.dumps(x)
        return True

    except Exception:
        return False