private void serializeHeartbeat(@NonNull final JsonObject jsonObject,
                                    @NonNull final ProvisionedMeshNode node) {
        final ConfigurationServerModel model = getConfigurationServerModel(node);
        if (model != null) {
            if (model.getHeartbeatPublication() != null) {
                final HeartbeatPublication publication = model.getHeartbeatPublication();
                final JsonObject heartbeatPub = new JsonObject();
                heartbeatPub.addProperty("address", formatAddress(publication.getDst(), false));
                heartbeatPub.addProperty("period", publication.getPeriod());
                heartbeatPub.addProperty("ttl", publication.getTtl());
                heartbeatPub.addProperty("index", publication.getNetKeyIndex());
                final JsonArray featuresArray = new JsonArray();
                if (publication.getFeatures().getRelay() == Features.ENABLED)
                    featuresArray.add("relay");
                if (publication.getFeatures().getProxy() == Features.ENABLED)
                    featuresArray.add("proxy");
                if (publication.getFeatures().getFriend() == Features.ENABLED)
                    featuresArray.add("friend");
                if (publication.getFeatures().getLowPower() == Features.ENABLED)
                    featuresArray.add("lowPower");
                heartbeatPub.add("features", featuresArray);
                jsonObject.add("heartbeatPub", heartbeatPub);
            }
            if (model.getHeartbeatSubscription() != null) {
                final JsonObject subscription = new JsonObject();
                subscription.addProperty("destination",
                        formatAddress(model.getHeartbeatSubscription().getDst(), false));
                subscription.addProperty("source",
                        formatAddress(model.getHeartbeatSubscription().getSrc(), false));
                jsonObject.add("heartbeatSub", subscription);
            }
        }
    }
Serialize Heartbeat settings.

@param jsonObject Json object
@param node       MeshNode
mesh/src/main/java/no/nordicsemi/android/mesh/transport/NodeDeserializer.java