{"action":"created","issue":{"url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/405","repository_url":"https://api.github.com/repos/bblanchon/ArduinoJson","labels_url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/405/labels{/name}","comments_url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/405/comments","events_url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/405/events","html_url":"https://github.com/bblanchon/ArduinoJson/issues/405","id":197583324,"number":405,"title":"auto parsing jsonArray","user":{"login":"Pfannex","id":7262813,"avatar_url":"https://avatars.githubusercontent.com/u/7262813?v=3","gravatar_id":"","url":"https://api.github.com/users/Pfannex","html_url":"https://github.com/Pfannex","followers_url":"https://api.github.com/users/Pfannex/followers","following_url":"https://api.github.com/users/Pfannex/following{/other_user}","gists_url":"https://api.github.com/users/Pfannex/gists{/gist_id}","starred_url":"https://api.github.com/users/Pfannex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pfannex/subscriptions","organizations_url":"https://api.github.com/users/Pfannex/orgs","repos_url":"https://api.github.com/users/Pfannex/repos","events_url":"https://api.github.com/users/Pfannex/events{/privacy}","received_events_url":"https://api.github.com/users/Pfannex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-26T12:31:48Z","updated_at":"2016-12-27T08:53:48Z","closed_at":"2016-12-27T08:53:48Z","body":"Hi,\r\n\r\nthis is not an issue, but maybe another method to parse unkown jsonArrays.\r\n\r\nUnknown jsonArrrays can also be parsed by using the \"auto\" keyword in a for-loop.\r\n\r\n```\r\nvoid parseJSONarray(JsonArray& jsonArray){\r\n  for (auto &element : jsonArray){\r\n    if (element.is<JsonArray&>()){\r\n      JsonArray& nestedArray = element;\r\n      parseJSONarray(nestedArray);\r\n    }else{\r\n      Serial.println(element.asString());\r\n    }\r\n  }\r\n}\r\n```\r\nIt has the same meaning like this ...\r\nhttps://github.com/bblanchon/ArduinoJson/wiki/Examples#example-3-iterators\r\n\r\n\r\ne.g. **jsonArray**\r\n```\r\n[\r\n\"E0\",\r\n\"E1\",\r\n\t[\r\n\t\"E2.0\",\r\n\t\t[\r\n\t\t\"E2.1.0\",\r\n\t\t\"E2.1.1\",\r\n\t\t\t[\r\n\t\t\t\"E2.1.2.0\",\r\n\t\t\t\"E2.1.2.1\"\r\n\t\t\t]\r\n\t\t]\r\n\t],\r\n\"E3\",\r\n\"E4\",\r\n\"E5\",\r\n\t[\r\n\t\"E6.0\",\r\n\t\t[\r\n\t\t\"E6.1.0\",\r\n\t\t\"E6.1.1\",\r\n\t\t\t[\r\n\t\t\t\"E6.1.2.0\",\r\n\t\t\t\"E6.1.2.1\"\r\n\t\t\t],\r\n\t\t\"E6.1.3\",\r\n\t\t\"E6.1.4\"\r\n\t\t]\r\n\t],\r\n\"E7\",\r\n\"E8\",\r\n\"E9\"\r\n]\r\n```\r\n\r\n**Output**\r\n```\r\nE0\r\nE1\r\nE2.0\r\nE2.1.0\r\nE2.1.1\r\nE2.1.2.0\r\nE2.1.2.1\r\nE3\r\nE4\r\nE5\r\nE6.0\r\nE6.1.0\r\nE6.1.1\r\nE6.1.2.0\r\nE6.1.2.1\r\nE6.1.3\r\nE6.1.4\r\nE7\r\nE8\r\nE9\r\n```\r\n\r\nHappy xmas...\r\nPf@nne\r\n"},"comment":{"url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/comments/269295997","html_url":"https://github.com/bblanchon/ArduinoJson/issues/405#issuecomment-269295997","issue_url":"https://api.github.com/repos/bblanchon/ArduinoJson/issues/405","id":269295997,"user":{"login":"bblanchon","id":5462433,"avatar_url":"https://avatars.githubusercontent.com/u/5462433?v=3","gravatar_id":"","url":"https://api.github.com/users/bblanchon","html_url":"https://github.com/bblanchon","followers_url":"https://api.github.com/users/bblanchon/followers","following_url":"https://api.github.com/users/bblanchon/following{/other_user}","gists_url":"https://api.github.com/users/bblanchon/gists{/gist_id}","starred_url":"https://api.github.com/users/bblanchon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bblanchon/subscriptions","organizations_url":"https://api.github.com/users/bblanchon/orgs","repos_url":"https://api.github.com/users/bblanchon/repos","events_url":"https://api.github.com/users/bblanchon/events{/privacy}","received_events_url":"https://api.github.com/users/bblanchon/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T08:53:48Z","updated_at":"2016-12-27T08:53:48Z","body":"That is indeed a way to recursively scan through the array.\r\nThanks @Pfannex.\r\n"}}
{"actor":{"display_login":"bblanchon"}}