{"action":"created","issue":{"url":"https://api.github.com/repos/byzhang/rapidjson/issues/88","labels_url":"https://api.github.com/repos/byzhang/rapidjson/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/byzhang/rapidjson/issues/88/comments","events_url":"https://api.github.com/repos/byzhang/rapidjson/issues/88/events","html_url":"https://github.com/byzhang/rapidjson/issues/88","id":59729858,"number":88,"title":"Not able to convert json string into json object","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/byzhang/rapidjson/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/byzhang/rapidjson/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/byzhang/rapidjson/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-04T00:14:29Z","updated_at":"2015-03-04T00:14:31Z","closed_at":"2015-03-04T00:14:29Z","body":"```\nHi,\n\nThanks for providing a convenient solution.\n\nI was trying to make a sample program where JSON string is different and the \nresult is some strange charaters.\n\nSteps followed: (Using Visual studio 2010 professional)\n1) Copied Include folder in my project.\n2) Change Json string as:\nconst char json[] =\"{ \\\"address-book\\\" : [{ \\\"name\\\":\\\"Jane \nRoe\\\",\\\"email\\\":\\\"jane.roe@example.com\\\"},{\\\"name\\\":\\\"John\\\",\\\"email\\\" : \n\\\"john.doe@example.com\\\"}]}\";\n3) Code is compiling successfully in Release mode\n\n\n4) While debugging:\n     a) Pasring is done successfully\n     b) But it returns some strange characters at the end.\n\n \nPlease find the attached code for more details.\n\n\n\nThanks and Regards,\n\nVijay Soni\nSoftware Engineer (c++)\n```\n\nOriginal issue reported on code.google.com by `vijayson...@gmail.com` on 12 Aug 2013 at 7:09\n\nAttachments:\n* [RapidjsonTest](https://storage.googleapis.com/google-code-attachments/rapidjson/issue-88/comment-0/RapidjsonTest)\n"},"comment":{"url":"https://api.github.com/repos/byzhang/rapidjson/issues/comments/77069938","html_url":"https://github.com/byzhang/rapidjson/issues/88#issuecomment-77069938","issue_url":"https://api.github.com/repos/byzhang/rapidjson/issues/88","id":77069938,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T00:14:31Z","updated_at":"2015-03-04T00:14:31Z","body":"```\nHi,\n\n Sorry to trouble you again and again. But using the same I am getting strange reponse that's why I have posted my query here. \n\nCode is :\n\n#include \"stdafx.h\"\n#include \"URI.h\"\n#include <iostream>\n#include <cstdio>\n\n#include \"rapidjson\\document.h\"\t\t// rapidjson's DOM-style API\n#include \"rapidjson\\prettywriter.h\"\t// for stringify JSON\n#include \"rapidjson\\filestream.h\"\t// wrapper of C stream for prettywriter as \noutput\n#include \"rapidjson\\stringbuffer.h\"\n#include <cstdio>\n\n\nusing namespace std;\nusing namespace openutils;\nusing namespace rapidjson;\n\n\nrapidjson::Document objJson;\t// Default template parameter uses UTF8 and \nMemoryPoolAllocator.\nrapidjson::StringBuffer strBuff(0, 1024);\nrapidjson::Document::AllocatorType& allocator = objJson.GetAllocator();\nrapidjson::Value objVal(rapidjson::kObjectType);\t\n\nint main(int argc, char *argv[])\n{\nstatic const char* kTypeNames[] = { \"Null\", \"False\", \"True\", \"Object\", \"Array\", \n\"String\", \"Number\" }; \n\n\n\tconst char json[] =\t\"[\t\t\t\t\\\n\t{\t\t\t\t\\\n\t\\\"ResponseName\\\":\\\"Table\\\",\t\t\t\t\t\\\n\t\\\"ListData\\\":\t\t\\\n        [\t\\\t\t\t\t\t\t\t\t\t{\\\"Param\\\":\\\"Power\\\"},\t\t\t\t\\\t\t\t{\\\"Param\\\":\\\"Def\\\"},\t\t\t\t\\\n\t{\\\"Param\\\":\\\"Opt\\\"} \t\t\t\t\\\n]\t\t\t\t\t\t\t\t\t\\\n}\t\t\t\t\t\t\t\t\t\\\n]\";\n\n\n\tif(objJson.Parse<0>(json).HasParseError())\n\t{\n\tprintf(\"Error parsing \");\n\t}\n\t\t\t\t\nconst Value& a = objJson; // Using a reference for consecutive\nassert(a.IsArray());\nfor (SizeType i = 0; i < a.Size(); i++) // rapidjson uses SizeType instead of \nsize_t.         \nprintf(\"a[%d] = %d  /n\", i, a[i].GetInt());\n\t\t\t\t\t\nprintf(\"%s  /n\", a[SizeType(0)].GetString());\n\nif(objJson.IsArray())\n{\t\t\t\t\t\t\t\t\nfor (Value::ConstValueIterator itr = a.Begin(); itr != a.End(); ++itr)    \nprintf(\"%d \\n\", itr->GetInt());\n\nfor (Value::ConstMemberIterator itr = objJson.MemberBegin(); itr != \nobjJson.MemberEnd(); ++itr)     \nprintf(\"Type of member %s is %s\\n\", itr->name.GetString(), \nkTypeNames[itr->value.GetType()]);\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t}\n\t\tcatch(...)\n\t\t{\n\t\t\tprintf(\"Error unknown\");\n\t\t}\t\t\n\tgetchar();\n\treturn 0;\n}\n\n\n==> The response which I get is different everytime. such as (check the \nattachment)\n \n```\n\nOriginal comment by `vijayson...@gmail.com` on 16 Aug 2013 at 6:37\n\nAttachments:\n* [JsonResponse.jpg](https://storage.googleapis.com/google-code-attachments/rapidjson/issue-88/comment-6/JsonResponse.jpg)\n"}}