private List<Group> deserializeGroups(@NonNull final JsonObject jsonNetwork,
                                          @NonNull final String meshUuid) {
        final List<Group> groups = new ArrayList<>();
        if (!jsonNetwork.has("groups"))
            return groups;

        final JsonArray jsonGroups = jsonNetwork.getAsJsonArray("groups");
        for (int i = 0; i < jsonGroups.size(); i++) {
            try {
                final JsonObject jsonGroup = jsonGroups.get(i).getAsJsonObject();
                final String name = jsonGroup.get("name").getAsString();
                String address = jsonGroup.get("address").getAsString();
                String parentAddress = jsonGroup.get("parentAddress").getAsString();
                final Group group;

                if (isUuidPattern(address) && isUuidPattern(parentAddress)) {
                    group = new Group(UUID.fromString(formatUuid(address)), UUID.fromString(formatUuid(parentAddress)), meshUuid);
                } else if (isUuidPattern(address)) {
                    group = new Group(UUID.fromString(formatUuid(address)), Integer.parseInt(parentAddress, 16), meshUuid);
                } else if (isUuidPattern(parentAddress)) {
                    group = new Group(Integer.parseInt(parentAddress, 16), UUID.fromString(formatUuid(parentAddress)), meshUuid);
                } else {
                    group = new Group(Integer.parseInt(address, 16), Integer.parseInt(parentAddress, 16), meshUuid);
                }
                group.setName(name);
                groups.add(group);
            } catch (Exception ex) {
                MeshLogger.error(TAG, "Error while de-serializing groups: " + ex.getMessage());
            }
        }
        return groups;
    }
Returns a list of groups de-serializing the json array containing the groups

@param jsonNetwork json network object containing the groups
@param meshUuid    network provisionerUuid
@return List of nodes
mesh/src/main/java/no/nordicsemi/android/mesh/MeshNetworkDeserializer.java