private void deserializeHeartbeat(@NonNull final JsonObject jsonObject,
                                      @NonNull final ProvisionedMeshNode node) {
        final ConfigurationServerModel model = getConfigurationServerModel(node);
        if (model != null) {
            if (jsonObject.has("heartbeatPub")) {
                final JsonObject jsonHeartbeatPub = jsonObject.get("heartbeatPub").getAsJsonObject();
                final int dst;
                if (jsonHeartbeatPub.has("address")) {
                    dst = Integer.parseInt(jsonHeartbeatPub.get("address").getAsString(), 16);
                } else {
                    dst = Integer.parseInt(jsonHeartbeatPub.get("destination").getAsString(), 16);
                }
                if (dst != UNASSIGNED_ADDRESS) {
                    final JsonArray jsonFeatures = jsonHeartbeatPub.get("features").getAsJsonArray();
                    int relay = 0;
                    int proxy = 0;
                    int friend = 0;
                    int lowPower = 0;
                    for (JsonElement element : jsonFeatures) {
                        if (element.getAsString().equalsIgnoreCase("relay")) {
                            relay = Features.ENABLED;
                        } else if (element.getAsString().equalsIgnoreCase("proxy")) {
                            proxy = Features.ENABLED;
                        } else if (element.getAsString().equalsIgnoreCase("friend")) {
                            friend = Features.ENABLED;
                        } else if (element.getAsString().equalsIgnoreCase("lowPower")) {
                            lowPower = Features.ENABLED;
                        }
                    }

                    final Features features = new Features(friend, lowPower, proxy, relay);
                    final int index = jsonHeartbeatPub.get("index").getAsInt();
                    final byte period = Heartbeat.decodeHeartbeatPeriod(jsonHeartbeatPub.get("period").getAsInt());

                    final int ttl = jsonHeartbeatPub.get("ttl").getAsInt();
                    model.setHeartbeatPublication(new HeartbeatPublication(dst, (byte) 0, period, ttl, features, index));
                }
            }
            if (jsonObject.has("heartbeatSub")) {
                final JsonObject jsonHeartbeatSub = jsonObject.get("heartbeatSub").getAsJsonObject();
                final int dst = Integer.parseInt(jsonHeartbeatSub.get("destination").getAsString(), 16);
                final int src = Integer.parseInt(jsonHeartbeatSub.get("source").getAsString(), 16);
                if (dst != UNASSIGNED_ADDRESS || src != UNASSIGNED_ADDRESS)
                    model.setHeartbeatSubscription(new HeartbeatSubscription(src, dst, (byte) 0, (byte) 0, 0, 0));
            }
        }
    }
Deserialize Heartbeat settings

@param jsonObject JsonObject to deserialize from
@param node       MeshNode
mesh/src/main/java/no/nordicsemi/android/mesh/transport/NodeDeserializer.java