public static void toSlime(NetworkPorts networkPorts, Cursor array) {
        for (NetworkPorts.Allocation allocation : networkPorts.allocations()) {
            Cursor object = array.addObject();
            object.setLong(portNumberKey, allocation.port);
            object.setString(serviceTypeKey, allocation.serviceType);
            object.setString(configIdKey, allocation.configId);
            object.setString(portSuffixKey, allocation.portSuffix);
        }
    }
Serializes network port allocations to/from JSON.

@author arnej
config-provisioning/src/main/java/com/yahoo/config/provision/serialization/NetworkPortsSerializer.java