@staticmethod
    def validate(value):
        try:
            json.dumps(value)
        except TypeError:
            raise exception.Invalid(_('%s is not JSON serializable') % value)
        else:
            return value
dataset/ETHPy150Open openstack/ironic/ironic/api/controllers/v1/types.py/JsonType.validate/original