{"action":"opened","number":9,"pull_request":{"url":"https://api.github.com/repos/Zguy/Jzon/pulls/9","id":36571421,"html_url":"https://github.com/Zguy/Jzon/pull/9","diff_url":"https://github.com/Zguy/Jzon/pull/9.diff","patch_url":"https://github.com/Zguy/Jzon/pull/9.patch","issue_url":"https://api.github.com/repos/Zguy/Jzon/issues/9","number":9,"state":"open","locked":false,"title":"Fix for escaped characters","user":{"login":"warvair","id":3371879,"avatar_url":"https://avatars.githubusercontent.com/u/3371879?v=3","gravatar_id":"","url":"https://api.github.com/users/warvair","html_url":"https://github.com/warvair","followers_url":"https://api.github.com/users/warvair/followers","following_url":"https://api.github.com/users/warvair/following{/other_user}","gists_url":"https://api.github.com/users/warvair/gists{/gist_id}","starred_url":"https://api.github.com/users/warvair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warvair/subscriptions","organizations_url":"https://api.github.com/users/warvair/orgs","repos_url":"https://api.github.com/users/warvair/repos","events_url":"https://api.github.com/users/warvair/events{/privacy}","received_events_url":"https://api.github.com/users/warvair/received_events","type":"User","site_admin":false},"body":"I discovered that control characters were not escaped properly when written to file. It seems to me that as long as strings are in memory (C strings or std::string) the control codes should not be escaped, they should only be escaped when written to a stream and unescaped when parsed from a stream. So that's where I put the calls.\r\n\r\nThis may or may not be the best fix for this issue, but it seems to work. \r\n\r\nAlso, the test I added is a bit wonky and you might want to change it.\r\n\r\nMy editor whitespace settings seem to be incompatible with yours or github's, so I reverted and recommitted with less changes to whitespace (by making targeted edits) but there's still seems to be alignment issues. Anyway, that's why there are 3 commits.","created_at":"2015-05-30T20:21:44Z","updated_at":"2015-05-30T20:21:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Zguy/Jzon/pulls/9/commits","review_comments_url":"https://api.github.com/repos/Zguy/Jzon/pulls/9/comments","review_comment_url":"https://api.github.com/repos/Zguy/Jzon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Zguy/Jzon/issues/9/comments","statuses_url":"https://api.github.com/repos/Zguy/Jzon/statuses/819d435b27b18877be6ac15d5ad8f7adc79af590","head":{"label":"warvair:master","ref":"master","sha":"819d435b27b18877be6ac15d5ad8f7adc79af590","user":{"login":"warvair","id":3371879,"avatar_url":"https://avatars.githubusercontent.com/u/3371879?v=3","gravatar_id":"","url":"https://api.github.com/users/warvair","html_url":"https://github.com/warvair","followers_url":"https://api.github.com/users/warvair/followers","following_url":"https://api.github.com/users/warvair/following{/other_user}","gists_url":"https://api.github.com/users/warvair/gists{/gist_id}","starred_url":"https://api.github.com/users/warvair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warvair/subscriptions","organizations_url":"https://api.github.com/users/warvair/orgs","repos_url":"https://api.github.com/users/warvair/repos","events_url":"https://api.github.com/users/warvair/events{/privacy}","received_events_url":"https://api.github.com/users/warvair/received_events","type":"User","site_admin":false},"repo":{"id":36573394,"name":"Jzon","full_name":"warvair/Jzon","owner":{"login":"warvair","id":3371879,"avatar_url":"https://avatars.githubusercontent.com/u/3371879?v=3","gravatar_id":"","url":"https://api.github.com/users/warvair","html_url":"https://github.com/warvair","followers_url":"https://api.github.com/users/warvair/followers","following_url":"https://api.github.com/users/warvair/following{/other_user}","gists_url":"https://api.github.com/users/warvair/gists{/gist_id}","starred_url":"https://api.github.com/users/warvair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/warvair/subscriptions","organizations_url":"https://api.github.com/users/warvair/orgs","repos_url":"https://api.github.com/users/warvair/repos","events_url":"https://api.github.com/users/warvair/events{/privacy}","received_events_url":"https://api.github.com/users/warvair/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/warvair/Jzon","description":"C++ JSON Parser","fork":true,"url":"https://api.github.com/repos/warvair/Jzon","forks_url":"https://api.github.com/repos/warvair/Jzon/forks","keys_url":"https://api.github.com/repos/warvair/Jzon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/warvair/Jzon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/warvair/Jzon/teams","hooks_url":"https://api.github.com/repos/warvair/Jzon/hooks","issue_events_url":"https://api.github.com/repos/warvair/Jzon/issues/events{/number}","events_url":"https://api.github.com/repos/warvair/Jzon/events","assignees_url":"https://api.github.com/repos/warvair/Jzon/assignees{/user}","branches_url":"https://api.github.com/repos/warvair/Jzon/branches{/branch}","tags_url":"https://api.github.com/repos/warvair/Jzon/tags","blobs_url":"https://api.github.com/repos/warvair/Jzon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/warvair/Jzon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/warvair/Jzon/git/refs{/sha}","trees_url":"https://api.github.com/repos/warvair/Jzon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/warvair/Jzon/statuses/{sha}","languages_url":"https://api.github.com/repos/warvair/Jzon/languages","stargazers_url":"https://api.github.com/repos/warvair/Jzon/stargazers","contributors_url":"https://api.github.com/repos/warvair/Jzon/contributors","subscribers_url":"https://api.github.com/repos/warvair/Jzon/subscribers","subscription_url":"https://api.github.com/repos/warvair/Jzon/subscription","commits_url":"https://api.github.com/repos/warvair/Jzon/commits{/sha}","git_commits_url":"https://api.github.com/repos/warvair/Jzon/git/commits{/sha}","comments_url":"https://api.github.com/repos/warvair/Jzon/comments{/number}","issue_comment_url":"https://api.github.com/repos/warvair/Jzon/issues/comments{/number}","contents_url":"https://api.github.com/repos/warvair/Jzon/contents/{+path}","compare_url":"https://api.github.com/repos/warvair/Jzon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/warvair/Jzon/merges","archive_url":"https://api.github.com/repos/warvair/Jzon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/warvair/Jzon/downloads","issues_url":"https://api.github.com/repos/warvair/Jzon/issues{/number}","pulls_url":"https://api.github.com/repos/warvair/Jzon/pulls{/number}","milestones_url":"https://api.github.com/repos/warvair/Jzon/milestones{/number}","notifications_url":"https://api.github.com/repos/warvair/Jzon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/warvair/Jzon/labels{/name}","releases_url":"https://api.github.com/repos/warvair/Jzon/releases{/id}","created_at":"2015-05-30T19:55:29Z","updated_at":"2015-05-30T19:55:29Z","pushed_at":"2015-05-30T20:02:52Z","git_url":"git://github.com/warvair/Jzon.git","ssh_url":"git@github.com:warvair/Jzon.git","clone_url":"https://github.com/warvair/Jzon.git","svn_url":"https://github.com/warvair/Jzon","homepage":"http://zguy.github.io/Jzon","size":847,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Zguy:master","ref":"master","sha":"0db6e87d076f53d32bd530d8e7b9e7d6e1b55e32","user":{"login":"Zguy","id":1418216,"avatar_url":"https://avatars.githubusercontent.com/u/1418216?v=3","gravatar_id":"","url":"https://api.github.com/users/Zguy","html_url":"https://github.com/Zguy","followers_url":"https://api.github.com/users/Zguy/followers","following_url":"https://api.github.com/users/Zguy/following{/other_user}","gists_url":"https://api.github.com/users/Zguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Zguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zguy/subscriptions","organizations_url":"https://api.github.com/users/Zguy/orgs","repos_url":"https://api.github.com/users/Zguy/repos","events_url":"https://api.github.com/users/Zguy/events{/privacy}","received_events_url":"https://api.github.com/users/Zguy/received_events","type":"User","site_admin":false},"repo":{"id":3392105,"name":"Jzon","full_name":"Zguy/Jzon","owner":{"login":"Zguy","id":1418216,"avatar_url":"https://avatars.githubusercontent.com/u/1418216?v=3","gravatar_id":"","url":"https://api.github.com/users/Zguy","html_url":"https://github.com/Zguy","followers_url":"https://api.github.com/users/Zguy/followers","following_url":"https://api.github.com/users/Zguy/following{/other_user}","gists_url":"https://api.github.com/users/Zguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Zguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zguy/subscriptions","organizations_url":"https://api.github.com/users/Zguy/orgs","repos_url":"https://api.github.com/users/Zguy/repos","events_url":"https://api.github.com/users/Zguy/events{/privacy}","received_events_url":"https://api.github.com/users/Zguy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Zguy/Jzon","description":"C++ JSON Parser","fork":false,"url":"https://api.github.com/repos/Zguy/Jzon","forks_url":"https://api.github.com/repos/Zguy/Jzon/forks","keys_url":"https://api.github.com/repos/Zguy/Jzon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Zguy/Jzon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Zguy/Jzon/teams","hooks_url":"https://api.github.com/repos/Zguy/Jzon/hooks","issue_events_url":"https://api.github.com/repos/Zguy/Jzon/issues/events{/number}","events_url":"https://api.github.com/repos/Zguy/Jzon/events","assignees_url":"https://api.github.com/repos/Zguy/Jzon/assignees{/user}","branches_url":"https://api.github.com/repos/Zguy/Jzon/branches{/branch}","tags_url":"https://api.github.com/repos/Zguy/Jzon/tags","blobs_url":"https://api.github.com/repos/Zguy/Jzon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Zguy/Jzon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Zguy/Jzon/git/refs{/sha}","trees_url":"https://api.github.com/repos/Zguy/Jzon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Zguy/Jzon/statuses/{sha}","languages_url":"https://api.github.com/repos/Zguy/Jzon/languages","stargazers_url":"https://api.github.com/repos/Zguy/Jzon/stargazers","contributors_url":"https://api.github.com/repos/Zguy/Jzon/contributors","subscribers_url":"https://api.github.com/repos/Zguy/Jzon/subscribers","subscription_url":"https://api.github.com/repos/Zguy/Jzon/subscription","commits_url":"https://api.github.com/repos/Zguy/Jzon/commits{/sha}","git_commits_url":"https://api.github.com/repos/Zguy/Jzon/git/commits{/sha}","comments_url":"https://api.github.com/repos/Zguy/Jzon/comments{/number}","issue_comment_url":"https://api.github.com/repos/Zguy/Jzon/issues/comments{/number}","contents_url":"https://api.github.com/repos/Zguy/Jzon/contents/{+path}","compare_url":"https://api.github.com/repos/Zguy/Jzon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Zguy/Jzon/merges","archive_url":"https://api.github.com/repos/Zguy/Jzon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Zguy/Jzon/downloads","issues_url":"https://api.github.com/repos/Zguy/Jzon/issues{/number}","pulls_url":"https://api.github.com/repos/Zguy/Jzon/pulls{/number}","milestones_url":"https://api.github.com/repos/Zguy/Jzon/milestones{/number}","notifications_url":"https://api.github.com/repos/Zguy/Jzon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Zguy/Jzon/labels{/name}","releases_url":"https://api.github.com/repos/Zguy/Jzon/releases{/id}","created_at":"2012-02-08T22:30:24Z","updated_at":"2015-05-22T20:45:34Z","pushed_at":"2015-04-05T14:59:04Z","git_url":"git://github.com/Zguy/Jzon.git","ssh_url":"git@github.com:Zguy/Jzon.git","clone_url":"https://github.com/Zguy/Jzon.git","svn_url":"https://github.com/Zguy/Jzon","homepage":"http://zguy.github.io/Jzon","size":847,"stargazers_count":18,"watchers_count":18,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Zguy/Jzon/pulls/9"},"html":{"href":"https://github.com/Zguy/Jzon/pull/9"},"issue":{"href":"https://api.github.com/repos/Zguy/Jzon/issues/9"},"comments":{"href":"https://api.github.com/repos/Zguy/Jzon/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/Zguy/Jzon/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/Zguy/Jzon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Zguy/Jzon/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/Zguy/Jzon/statuses/819d435b27b18877be6ac15d5ad8f7adc79af590"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":23,"deletions":11,"changed_files":2}}