public static void toSlime(List<DataplaneToken> dataplaneTokens, Cursor root) {
        for (DataplaneToken token : dataplaneTokens) {
            Cursor cursor = root.addObject();
            cursor.setString(ID_FIELD, token.tokenId());
            Cursor versions = cursor.setArray(VERSIONS_FIELD);
            token.versions().forEach(v -> {
                Cursor val = versions.addObject();
                val.setString(FINGERPRINT_FIELD, v.fingerprint());
                val.setString(CHECKACCESSHASH_FIELD, v.checkAccessHash());
                val.setString(EXPIRATION_FIELD, v.expiration().map(Instant::toString).orElse("<none>"));
            });
        }
    }
Serialize/deserialize dataplane tokens

@author mortent
configserver/src/main/java/com/yahoo/vespa/config/server/tenant/DataplaneTokenSerializer.java