{"action":"created","comment":{"url":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/comments/88025267","pull_request_review_id":8611178,"id":88025267,"diff_hunk":"@@ -362,14 +362,17 @@ def get_declaration(self):\n \n     def from_json(self):\n         if self.value_type.is_zerobuf_type:\n-            return '::zerobuf::fromJSON( ::zerobuf::getJSONField( json, \"{0}\" ), _{0} );'.\\\n-                format(self.cxxname)\n+            return 'if( ::zerobuf::hasJSONField( json, \"{0}\" ))'\\\n+                   '{1}    ::zerobuf::fromJSON( ::zerobuf::getJSONField( json, \"{0}\" ), _{0} );'.\\\n+                format(self.cxxname, NEXTLINE)\n         # convert enums to their name as a string\n         if self.value_type.is_enum_type:\n-            return 'set{0}( {1}( string_to_{1}( ::zerobuf::fromJSON< std::string >( ::zerobuf::getJSONField( json, \"{2}\" )))));'.\\\n-                format(self.cxxName, self.value_type.type, self.cxxname)\n-        return 'set{0}( {1}( ::zerobuf::fromJSON< {2} >( ::zerobuf::getJSONField( json, \"{3}\" ))));'.\\\n-                format(self.cxxName, self.value_type.type, self.value_type.get_data_type(), self.cxxname)\n+            return 'if( ::zerobuf::hasJSONField( json, \"{2}\" ))'\\\n+                   '{3}    set{0}( {1}( string_to_{1}( ::zerobuf::fromJSON< std::string >( ::zerobuf::getJSONField( json, \"{2}\" )))));'.\\\n+                format(self.cxxName, self.value_type.type, self.cxxname, NEXTLINE)","path":"bin/zerobufCxx.py","position":17,"original_position":17,"commit_id":"6f65f352ff055f5bc7e8a30a619634ff3fc2038a","original_commit_id":"6f65f352ff055f5bc7e8a30a619634ff3fc2038a","user":{"login":"favreau","id":8790943,"avatar_url":"https://avatars.githubusercontent.com/u/8790943?v=3","gravatar_id":"","url":"https://api.github.com/users/favreau","html_url":"https://github.com/favreau","followers_url":"https://api.github.com/users/favreau/followers","following_url":"https://api.github.com/users/favreau/following{/other_user}","gists_url":"https://api.github.com/users/favreau/gists{/gist_id}","starred_url":"https://api.github.com/users/favreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/favreau/subscriptions","organizations_url":"https://api.github.com/users/favreau/orgs","repos_url":"https://api.github.com/users/favreau/repos","events_url":"https://api.github.com/users/favreau/events{/privacy}","received_events_url":"https://api.github.com/users/favreau/received_events","type":"User","site_admin":false},"body":"It's not quiet obvious to me what the difference is between cxxName and cxxname. Any chance this can be clarified by finding a more appropriate variable name?","created_at":"2016-11-15T14:22:49Z","updated_at":"2016-11-15T14:33:42Z","html_url":"https://github.com/HBPVIS/ZeroBuf/pull/68#discussion_r88025267","pull_request_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/68","_links":{"self":{"href":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/comments/88025267"},"html":{"href":"https://github.com/HBPVIS/ZeroBuf/pull/68#discussion_r88025267"},"pull_request":{"href":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/68"}}},"pull_request":{"url":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/68","id":93770172,"html_url":"https://github.com/HBPVIS/ZeroBuf/pull/68","diff_url":"https://github.com/HBPVIS/ZeroBuf/pull/68.diff","patch_url":"https://github.com/HBPVIS/ZeroBuf/pull/68.patch","issue_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/issues/68","number":68,"state":"open","locked":false,"title":"Support partial JSON updates","user":{"login":"tribal-tec","id":701401,"avatar_url":"https://avatars.githubusercontent.com/u/701401?v=3","gravatar_id":"","url":"https://api.github.com/users/tribal-tec","html_url":"https://github.com/tribal-tec","followers_url":"https://api.github.com/users/tribal-tec/followers","following_url":"https://api.github.com/users/tribal-tec/following{/other_user}","gists_url":"https://api.github.com/users/tribal-tec/gists{/gist_id}","starred_url":"https://api.github.com/users/tribal-tec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tribal-tec/subscriptions","organizations_url":"https://api.github.com/users/tribal-tec/orgs","repos_url":"https://api.github.com/users/tribal-tec/repos","events_url":"https://api.github.com/users/tribal-tec/events{/privacy}","received_events_url":"https://api.github.com/users/tribal-tec/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-11-15T13:59:49Z","updated_at":"2016-11-15T14:33:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9bfd1338a03ed5955e593a3f7c4a396cd15a3f4c","assignee":{"login":"rdumusc","id":5166658,"avatar_url":"https://avatars.githubusercontent.com/u/5166658?v=3","gravatar_id":"","url":"https://api.github.com/users/rdumusc","html_url":"https://github.com/rdumusc","followers_url":"https://api.github.com/users/rdumusc/followers","following_url":"https://api.github.com/users/rdumusc/following{/other_user}","gists_url":"https://api.github.com/users/rdumusc/gists{/gist_id}","starred_url":"https://api.github.com/users/rdumusc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdumusc/subscriptions","organizations_url":"https://api.github.com/users/rdumusc/orgs","repos_url":"https://api.github.com/users/rdumusc/repos","events_url":"https://api.github.com/users/rdumusc/events{/privacy}","received_events_url":"https://api.github.com/users/rdumusc/received_events","type":"User","site_admin":false},"assignees":[{"login":"rdumusc","id":5166658,"avatar_url":"https://avatars.githubusercontent.com/u/5166658?v=3","gravatar_id":"","url":"https://api.github.com/users/rdumusc","html_url":"https://github.com/rdumusc","followers_url":"https://api.github.com/users/rdumusc/followers","following_url":"https://api.github.com/users/rdumusc/following{/other_user}","gists_url":"https://api.github.com/users/rdumusc/gists{/gist_id}","starred_url":"https://api.github.com/users/rdumusc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdumusc/subscriptions","organizations_url":"https://api.github.com/users/rdumusc/orgs","repos_url":"https://api.github.com/users/rdumusc/repos","events_url":"https://api.github.com/users/rdumusc/events{/privacy}","received_events_url":"https://api.github.com/users/rdumusc/received_events","type":"User","site_admin":false},{"login":"favreau","id":8790943,"avatar_url":"https://avatars.githubusercontent.com/u/8790943?v=3","gravatar_id":"","url":"https://api.github.com/users/favreau","html_url":"https://github.com/favreau","followers_url":"https://api.github.com/users/favreau/followers","following_url":"https://api.github.com/users/favreau/following{/other_user}","gists_url":"https://api.github.com/users/favreau/gists{/gist_id}","starred_url":"https://api.github.com/users/favreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/favreau/subscriptions","organizations_url":"https://api.github.com/users/favreau/orgs","repos_url":"https://api.github.com/users/favreau/repos","events_url":"https://api.github.com/users/favreau/events{/privacy}","received_events_url":"https://api.github.com/users/favreau/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/68/commits","review_comments_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/68/comments","review_comment_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/issues/68/comments","statuses_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/statuses/6f65f352ff055f5bc7e8a30a619634ff3fc2038a","head":{"label":"tribal-tec:master","ref":"master","sha":"6f65f352ff055f5bc7e8a30a619634ff3fc2038a","user":{"login":"tribal-tec","id":701401,"avatar_url":"https://avatars.githubusercontent.com/u/701401?v=3","gravatar_id":"","url":"https://api.github.com/users/tribal-tec","html_url":"https://github.com/tribal-tec","followers_url":"https://api.github.com/users/tribal-tec/followers","following_url":"https://api.github.com/users/tribal-tec/following{/other_user}","gists_url":"https://api.github.com/users/tribal-tec/gists{/gist_id}","starred_url":"https://api.github.com/users/tribal-tec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tribal-tec/subscriptions","organizations_url":"https://api.github.com/users/tribal-tec/orgs","repos_url":"https://api.github.com/users/tribal-tec/repos","events_url":"https://api.github.com/users/tribal-tec/events{/privacy}","received_events_url":"https://api.github.com/users/tribal-tec/received_events","type":"User","site_admin":false},"repo":{"id":39784582,"name":"ZeroBuf","full_name":"tribal-tec/ZeroBuf","owner":{"login":"tribal-tec","id":701401,"avatar_url":"https://avatars.githubusercontent.com/u/701401?v=3","gravatar_id":"","url":"https://api.github.com/users/tribal-tec","html_url":"https://github.com/tribal-tec","followers_url":"https://api.github.com/users/tribal-tec/followers","following_url":"https://api.github.com/users/tribal-tec/following{/other_user}","gists_url":"https://api.github.com/users/tribal-tec/gists{/gist_id}","starred_url":"https://api.github.com/users/tribal-tec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tribal-tec/subscriptions","organizations_url":"https://api.github.com/users/tribal-tec/orgs","repos_url":"https://api.github.com/users/tribal-tec/repos","events_url":"https://api.github.com/users/tribal-tec/events{/privacy}","received_events_url":"https://api.github.com/users/tribal-tec/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tribal-tec/ZeroBuf","description":"Zerocopy protocol buffers","fork":true,"url":"https://api.github.com/repos/tribal-tec/ZeroBuf","forks_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/forks","keys_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/teams","hooks_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/hooks","issue_events_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/issues/events{/number}","events_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/events","assignees_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/assignees{/user}","branches_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/branches{/branch}","tags_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/tags","blobs_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/statuses/{sha}","languages_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/languages","stargazers_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/stargazers","contributors_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/contributors","subscribers_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/subscribers","subscription_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/subscription","commits_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/contents/{+path}","compare_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/merges","archive_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/downloads","issues_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/issues{/number}","pulls_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/pulls{/number}","milestones_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/milestones{/number}","notifications_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/labels{/name}","releases_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/releases{/id}","deployments_url":"https://api.github.com/repos/tribal-tec/ZeroBuf/deployments","created_at":"2015-07-27T16:13:43Z","updated_at":"2016-01-11T10:00:20Z","pushed_at":"2016-11-15T13:59:46Z","git_url":"git://github.com/tribal-tec/ZeroBuf.git","ssh_url":"git@github.com:tribal-tec/ZeroBuf.git","clone_url":"https://github.com/tribal-tec/ZeroBuf.git","svn_url":"https://github.com/tribal-tec/ZeroBuf","homepage":null,"size":1510,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HBPVIS:master","ref":"master","sha":"76502bc7224ea3ce1665949b81bc0e2f00cca723","user":{"login":"HBPVIS","id":7261238,"avatar_url":"https://avatars.githubusercontent.com/u/7261238?v=3","gravatar_id":"","url":"https://api.github.com/users/HBPVIS","html_url":"https://github.com/HBPVIS","followers_url":"https://api.github.com/users/HBPVIS/followers","following_url":"https://api.github.com/users/HBPVIS/following{/other_user}","gists_url":"https://api.github.com/users/HBPVIS/gists{/gist_id}","starred_url":"https://api.github.com/users/HBPVIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HBPVIS/subscriptions","organizations_url":"https://api.github.com/users/HBPVIS/orgs","repos_url":"https://api.github.com/users/HBPVIS/repos","events_url":"https://api.github.com/users/HBPVIS/events{/privacy}","received_events_url":"https://api.github.com/users/HBPVIS/received_events","type":"Organization","site_admin":false},"repo":{"id":39505367,"name":"ZeroBuf","full_name":"HBPVIS/ZeroBuf","owner":{"login":"HBPVIS","id":7261238,"avatar_url":"https://avatars.githubusercontent.com/u/7261238?v=3","gravatar_id":"","url":"https://api.github.com/users/HBPVIS","html_url":"https://github.com/HBPVIS","followers_url":"https://api.github.com/users/HBPVIS/followers","following_url":"https://api.github.com/users/HBPVIS/following{/other_user}","gists_url":"https://api.github.com/users/HBPVIS/gists{/gist_id}","starred_url":"https://api.github.com/users/HBPVIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HBPVIS/subscriptions","organizations_url":"https://api.github.com/users/HBPVIS/orgs","repos_url":"https://api.github.com/users/HBPVIS/repos","events_url":"https://api.github.com/users/HBPVIS/events{/privacy}","received_events_url":"https://api.github.com/users/HBPVIS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HBPVIS/ZeroBuf","description":"zero-copy, zero-serialize, zero-hassle protocol buffers","fork":false,"url":"https://api.github.com/repos/HBPVIS/ZeroBuf","forks_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/forks","keys_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/teams","hooks_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/hooks","issue_events_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/issues/events{/number}","events_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/events","assignees_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/assignees{/user}","branches_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/branches{/branch}","tags_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/tags","blobs_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/statuses/{sha}","languages_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/languages","stargazers_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/stargazers","contributors_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/contributors","subscribers_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/subscribers","subscription_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/subscription","commits_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/contents/{+path}","compare_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/merges","archive_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/downloads","issues_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/issues{/number}","pulls_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls{/number}","milestones_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/milestones{/number}","notifications_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/labels{/name}","releases_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/releases{/id}","deployments_url":"https://api.github.com/repos/HBPVIS/ZeroBuf/deployments","created_at":"2015-07-22T12:41:50Z","updated_at":"2016-10-30T07:29:13Z","pushed_at":"2016-11-15T13:59:49Z","git_url":"git://github.com/HBPVIS/ZeroBuf.git","ssh_url":"git@github.com:HBPVIS/ZeroBuf.git","clone_url":"https://github.com/HBPVIS/ZeroBuf.git","svn_url":"https://github.com/HBPVIS/ZeroBuf","homepage":"http://hbpvis.github.io/","size":1462,"stargazers_count":6,"watchers_count":6,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":2,"forks":13,"open_issues":2,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/68"},"html":{"href":"https://github.com/HBPVIS/ZeroBuf/pull/68"},"issue":{"href":"https://api.github.com/repos/HBPVIS/ZeroBuf/issues/68"},"comments":{"href":"https://api.github.com/repos/HBPVIS/ZeroBuf/issues/68/comments"},"review_comments":{"href":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/68/comments"},"review_comment":{"href":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HBPVIS/ZeroBuf/pulls/68/commits"},"statuses":{"href":"https://api.github.com/repos/HBPVIS/ZeroBuf/statuses/6f65f352ff055f5bc7e8a30a619634ff3fc2038a"}}}}
{"actor":{"display_login":"favreau"}}