{"action":"opened","issue":{"url":"https://api.github.com/repos/Cheedoong/xml2json/issues/5","labels_url":"https://api.github.com/repos/Cheedoong/xml2json/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/Cheedoong/xml2json/issues/5/comments","events_url":"https://api.github.com/repos/Cheedoong/xml2json/issues/5/events","html_url":"https://github.com/Cheedoong/xml2json/issues/5","id":64992574,"number":5,"title":"Code analysis warns about stacksize","user":{"login":"zoenie123","id":11677510,"avatar_url":"https://avatars.githubusercontent.com/u/11677510?v=3","gravatar_id":"","url":"https://api.github.com/users/zoenie123","html_url":"https://github.com/zoenie123","followers_url":"https://api.github.com/users/zoenie123/followers","following_url":"https://api.github.com/users/zoenie123/following{/other_user}","gists_url":"https://api.github.com/users/zoenie123/gists{/gist_id}","starred_url":"https://api.github.com/users/zoenie123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoenie123/subscriptions","organizations_url":"https://api.github.com/users/zoenie123/orgs","repos_url":"https://api.github.com/users/zoenie123/repos","events_url":"https://api.github.com/users/zoenie123/events{/privacy}","received_events_url":"https://api.github.com/users/zoenie123/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-28T21:35:06Z","updated_at":"2015-03-28T21:35:06Z","closed_at":null,"body":"Maybe it's a good idea to look at the warning below of an analysis of Microsoft Visual Studio 2013.\r\n\r\nc:\\development\\gatewaylight\\xml2json.hpp(162): warning C6262: Function uses '65760' bytes of stack:  exceeds /analyze:stacksize '16384'.  Consider moving some data to heap.\r\n\r\nstd::string xml2json(const char *xml_str)\r\n{\r\n  //file<> fdoc(\"track_orig.xml\");\r\n  rapidxml::xml_document<> doc;\r\n  doc.parse<0>(const_cast<char *>(xml_str));\r\n\r\n  rapidjson::Document document;\r\n  document.SetObject();\r\n  rapidjson::Document::AllocatorType& allocator = document.GetAllocator();\r\n\r\n  rapidxml::xml_node<> *xmlnode_chd;\r\n\r\n  for(xmlnode_chd = doc.first_node(); xmlnode_chd; xmlnode_chd = xmlnode_chd->next_sibling()) {\r\n    //cout << xmlnode_chd->name() << endl;\r\n    rapidjson::Value jsvalue_chd;\r\n    jsvalue_chd.SetObject();\r\n    traverse_node(xmlnode_chd, jsvalue_chd, allocator);\r\n    document.AddMember(rapidjson::StringRef(xmlnode_chd->name()), jsvalue_chd, allocator);\r\n  }\r\n  rapidjson::StringBuffer buffer;\r\n  rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);\r\n  document.Accept(writer);\r\n  return buffer.GetString();\r\n}\r\n\r\n"}}