private double traverseImpl(JsonObject node,
JsonVisitorDouble postOrderVisitor) throws JsonException {
List<Double> values = new ArrayList<Double>();
JsonValue childNode = node.get("children");
if (childNode != JsonValue.NULL) {
JsonArray children = childNode.asArray();
for (int i = 0, n = children.getLength(); i < n; i++) {
values.add(traverseImpl(children.get(i).asObject(), postOrderVisitor));
}
}
return postOrderVisitor.visit(node, values);