for (int i = 0; i < node.size(); i++) {
arr.addToArray(i, convert(node.get(i)));
}
return arr;
} else if (node.isObject()) {
SimpleMapValue map = new SimpleMapValue();
String name;
for (Iterator<String> iter = node.fieldNames(); iter.hasNext();) {
name = iter.next();
map.setByName(name, convert(node.get(name)));
}
return map;
} else if (node.isBinary()) {
try {
return new BytesScalar(node.binaryValue());