} else {
nextKey = (String) node.getKeys().next();
newObj = node.getObject().get(nextKey);
}
if (newObj instanceof String) {
node = new Node(nextKey, convention);
nodes.push(node);
currentValue = (String) newObj;
event = START_ELEMENT;
return;
} else if (newObj instanceof JSONArray) {
JSONArray array = (JSONArray) newObj;
node = new Node(nextKey, convention);
node.setArray(array);
node.setArrayIndex(0);
nodes.push(node);
processElement();
return;
} else if (newObj instanceof JSONObject) {
node = new Node((Node)nodes.peek(), nextKey, (JSONObject) newObj, convention);
nodes.push(node);
event = START_ELEMENT;
return;
} else {
node = new Node(nextKey, convention);
nodes.push(node);
currentValue = newObj.toString();
event = START_ELEMENT;
return;
}