{"action":"created","issue":{"url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/203","labels_url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/203/comments","events_url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/203/events","html_url":"https://github.com/open-source-parsers/jsoncpp/issues/203","id":60082540,"number":203,"title":"StreamWriterBuilder: comments and styled output","user":{"login":"rickyviking","id":2272034,"avatar_url":"https://avatars.githubusercontent.com/u/2272034?v=3","gravatar_id":"","url":"https://api.github.com/users/rickyviking","html_url":"https://github.com/rickyviking","followers_url":"https://api.github.com/users/rickyviking/followers","following_url":"https://api.github.com/users/rickyviking/following{/other_user}","gists_url":"https://api.github.com/users/rickyviking/gists{/gist_id}","starred_url":"https://api.github.com/users/rickyviking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickyviking/subscriptions","organizations_url":"https://api.github.com/users/rickyviking/orgs","repos_url":"https://api.github.com/users/rickyviking/repos","events_url":"https://api.github.com/users/rickyviking/events{/privacy}","received_events_url":"https://api.github.com/users/rickyviking/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/open-source-parsers/jsoncpp/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-06T10:10:27Z","updated_at":"2015-03-06T18:02:57Z","closed_at":"2015-03-06T15:25:30Z","body":"Hi,\r\nI'm sticking with the `StreamWriterBuilder` as the other methods for writing seem to be deprecated.\r\nWith this new writer:\r\n\r\n* how to I output comments? I thought the following code would write them, but it does not:\r\n```c++\r\nJson::Value val; // fill val\r\nval.setComment(\"// this comment should appear before\", Json::CommentPlacement::commentBefore);\r\n// Configure the Builder, then ...\r\nJson::StreamWriterBuilder wbuilder;\r\nwbuilder.settings_[\"commentStyle\"] = \"All\";\r\nstd::string outputString = Json::writeString(wbuilder, val);\r\noutFile << outputString << std::endl;\r\n```\r\n\r\n* how to I get the styled output I used to get with:\r\n```c++\r\nJson::Value val; // fill val...\r\noutFile << val.toStyledString() << std::endl;\r\n```\r\n\r\nthanks, Ricky"},"comment":{"url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/comments/77605257","html_url":"https://github.com/open-source-parsers/jsoncpp/issues/203#issuecomment-77605257","issue_url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/203","id":77605257,"user":{"login":"rickyviking","id":2272034,"avatar_url":"https://avatars.githubusercontent.com/u/2272034?v=3","gravatar_id":"","url":"https://api.github.com/users/rickyviking","html_url":"https://github.com/rickyviking","followers_url":"https://api.github.com/users/rickyviking/followers","following_url":"https://api.github.com/users/rickyviking/following{/other_user}","gists_url":"https://api.github.com/users/rickyviking/gists{/gist_id}","starred_url":"https://api.github.com/users/rickyviking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickyviking/subscriptions","organizations_url":"https://api.github.com/users/rickyviking/orgs","repos_url":"https://api.github.com/users/rickyviking/repos","events_url":"https://api.github.com/users/rickyviking/events{/privacy}","received_events_url":"https://api.github.com/users/rickyviking/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T18:02:57Z","updated_at":"2015-03-06T18:02:57Z","body":"thx!"}}