{"action":"created","issue":{"url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/47","labels_url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/47/comments","events_url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/47/events","html_url":"https://github.com/open-source-parsers/jsoncpp/issues/47","id":44106309,"number":47,"title":"Value::swap does not swap some members","user":{"login":"cout","id":4090,"avatar_url":"https://avatars.githubusercontent.com/u/4090?v=3","gravatar_id":"","url":"https://api.github.com/users/cout","html_url":"https://github.com/cout","followers_url":"https://api.github.com/users/cout/followers","following_url":"https://api.github.com/users/cout/following{/other_user}","gists_url":"https://api.github.com/users/cout/gists{/gist_id}","starred_url":"https://api.github.com/users/cout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cout/subscriptions","organizations_url":"https://api.github.com/users/cout/orgs","repos_url":"https://api.github.com/users/cout/repos","events_url":"https://api.github.com/users/cout/events{/privacy}","received_events_url":"https://api.github.com/users/cout/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/open-source-parsers/jsoncpp/labels/help+wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2014-09-26T21:06:48Z","updated_at":"2015-01-20T07:56:56Z","closed_at":null,"body":"Looks like it fails to swap itemIsUsed_, memberNameIsStatic_, and comments_.  If this is intentional, it deserves a comment.\r\n"},"comment":{"url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/comments/70616966","html_url":"https://github.com/open-source-parsers/jsoncpp/issues/47#issuecomment-70616966","issue_url":"https://api.github.com/repos/open-source-parsers/jsoncpp/issues/47","id":70616966,"user":{"login":"datadiode","id":10423465,"avatar_url":"https://avatars.githubusercontent.com/u/10423465?v=3","gravatar_id":"","url":"https://api.github.com/users/datadiode","html_url":"https://github.com/datadiode","followers_url":"https://api.github.com/users/datadiode/followers","following_url":"https://api.github.com/users/datadiode/following{/other_user}","gists_url":"https://api.github.com/users/datadiode/gists{/gist_id}","starred_url":"https://api.github.com/users/datadiode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datadiode/subscriptions","organizations_url":"https://api.github.com/users/datadiode/orgs","repos_url":"https://api.github.com/users/datadiode/repos","events_url":"https://api.github.com/users/datadiode/events{/privacy}","received_events_url":"https://api.github.com/users/datadiode/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T07:56:56Z","updated_at":"2015-01-20T07:56:56Z","body":"There is some misunderstanding here. `Value::operator=()` does perform a deep copy, not a shallow copy. It uses copy-and-swap idiom, and as usual in that case, takes a by-value rather than a by-reference argument.\r\n\r\nIf it is acceptable to break v0.x based code, then I'd prefer to align `Value::operator=(Value)` behavior with regular expectations, and add a method `Value::setValue(Value)` which only affects the value but leaves comments and offsets in place. `Value::operator=(Value)` would use `swap()`, and `Value::setValue(Value)` would use `swapPayload()`."}}