John Rohrlich - 2014-02-15

I'm parsing nested arrays recursively. When (someNode->type() != JSON_ARRAY) I have found the innermost array (i.e. I have reached a value) and I want to pass that innermost array to another method. I tried someNode-- to get back to the array node but it isn't an array node.

JSONNode::const_iterator valueArray = aMatrix.begin();
while (valueArray != aMatrix.end()) {
if (valueArray->type() == JSON_ARRAY) {
ParseJSONMatrix(valueArray->as_array(), depth, dims);
else {
if (valueArray->type() == JSON_ARRAY) { // PROBLEM - not an array node
ParseJSONMatrixRow(valueArray->as_array(), depth, dims);