public static byte[] toJson(Map<NodeType, Version> versions) {
        Slime slime = new Slime();
        Cursor object = slime.setObject();
        versions.forEach((nodeType, version) -> object.setString(NodeSerializer.toString(nodeType),
                                                                 version.toFullString()));
        try {
            return SlimeUtils.toJsonBytes(slime);
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
Serializer for version numbers that are set per node type.

@author freva
@author mpolden
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/persistence/NodeTypeVersionsSerializer.java