public static OsVersionChange fromJson(byte[] data) {
        var targets = new TreeMap<NodeType, OsVersionTarget>();
        var inspector = SlimeUtils.jsonToSlime(data).get();
        inspector.field(TARGETS_FIELD).traverse((ArrayTraverser) (idx, arrayInspector) -> {
            var version = Version.fromString(arrayInspector.field(VERSION_FIELD).asString());
            var nodeType = NodeSerializer.nodeTypeFromString(arrayInspector.field(NODE_TYPE_FIELD).asString());
            targets.put(nodeType, new OsVersionTarget(nodeType, version));
        });
        return new OsVersionChange(targets);
    }
Serializer for {@link OsVersionChange}.

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