private JsonObject typeNodeToJson(Node<? extends Type> node, Gson gson) {
        JsonObject jsonNode = new JsonObject();

        jsonNode.add("data", gson.toJsonTree(node.data()));

        if (!node.isEmpty()) {
            JsonArray jsonChildren = new JsonArray();
            node.forEach(childNode -> {
                jsonChildren.add(typeNodeToJson(childNode, gson));
            });
            jsonNode.add("children", jsonChildren);
        }

        return jsonNode;
    }
@author Nico Bergemann <barracuda415 at yahoo.de>
disunity-cli/src/main/java/info/ata4/disunity/cli/command/asset/AssetTypes.java