public static void endpointToSlime(Cursor cursor, ContainerEndpoint endpoint) {
        cursor.setString(clusterIdField, endpoint.clusterId());
        cursor.setString(scopeField, asString(endpoint.scope()));
        endpoint.weight().ifPresent(w -> cursor.setLong(weightField, w));
        final var namesInspector = cursor.setArray(namesField);
        endpoint.names().forEach(namesInspector::addString);
        cursor.setString(routingMethodField, asString(endpoint.routingMethod()));
        cursor.setString(authMethodField, asString(endpoint.authMethod()));
    }
Contains all methods for de-/serializing ContainerEndpoints to/from JSON.
Also supports de-/serializing lists of these values.

@author ogronnesby
configserver/src/main/java/com/yahoo/vespa/config/server/tenant/ContainerEndpointSerializer.java