def METHOD_NAME(self, data):
    # don't serialize strings
    if isinstance(data, str):
        return data
    try:
        return json.METHOD_NAME(data, cls=CommCareJSONEncoder)
    except (ValueError, TypeError) as e:
        raise SerializationError(data, e)