private void findChildren(int nodeIndex) throws IOException {
        JointWrapper jw = fetchFromCache("nodes", nodeIndex, JointWrapper.class);
        if (jw == null) {
            logger.log(Level.WARNING,
                    "No JointWrapper found for nodeIndex={0}.", nodeIndex);
            return;
        }

        JsonObject nodeData = nodes.get(nodeIndex).getAsJsonObject();
        JsonArray children = nodeData.getAsJsonArray("children");

        if (children != null) {
            for (JsonElement child : children) {
                int childIndex = child.getAsInt();
                if (jw.children.contains(childIndex)) {
                    // bone already has the child in its children
                    continue;
                }
                JointWrapper cjw = fetchFromCache("nodes", childIndex, JointWrapper.class);
                if (cjw != null) {
                    jw.joint.addChild(cjw.joint);
                    jw.children.add(childIndex);
                } else {
                    // The child might be a Node
                    // Creating a dummy node to read the subgraph
                    Node n = new Node();
                    readChild(n, child);
                    Spatial s = n.getChild(0);
                    // removing the spatial from the dummy node,
                    // it will be attached to the attachment node of the bone
                    s.removeFromParent();
                    jw.attachedSpatial = s;
                }
            }
        }
    }
GLTF 2.0 loader
Created by Nehon on 07/08/2017.
jme3-plugins/src/gltf/java/com/jme3/scene/plugins/gltf/GltfLoader.java