public static List<MetricsPacket.Builder> toMetricsPackets(GenericJsonModel jsonModel) {
        var packets = toNodePackets(jsonModel.node);
        jsonModel.services.forEach(genericService -> packets.addAll(toServicePackets(genericService)));

        return packets;
    }
Utilities for converting between metrics packets and the generic json format.

@author gjoranv
metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/json/GenericJsonUtil.java