private JsonElement serializeExclusionList(@NonNull final Map<Integer, List<Integer>> networkExclusions) {
        final JsonArray exclusionList = new JsonArray();
        JsonObject exclusion;
        JsonArray array;
        for (Map.Entry<Integer, List<Integer>> entry : networkExclusions.entrySet()) {
            exclusion = new JsonObject();
            array = new JsonArray();
            for (Integer address : entry.getValue()) {
                array.add(MeshAddress.formatAddress(address, false));
            }
            exclusion.addProperty("ivIndex", entry.getKey());
            exclusion.add("addresses", array);
            exclusionList.add(exclusion);
        }
        return exclusionList;
    }
Returns serialized json element containing the exclusion list

@param networkExclusions exclusion list
@return JsonElement
mesh/src/main/java/no/nordicsemi/android/mesh/MeshNetworkDeserializer.java