{"action":"created","comment":{"url":"https://api.github.com/repos/node-modules/js-to-java/pulls/comments/55524597","id":55524597,"diff_hunk":"@@ -318,6 +318,12 @@ exports.array.Locale = function (locales, handle) {\n  * }\n  */\n exports.BigDecimal = function (val) {\n+  if (val === null || val === undefined) {\n+    val = 0;\n+  }\n+  if (typeof val === 'object') {\n+    val = val.value || 0;","path":"index.js","position":8,"original_position":8,"commit_id":"915d1f6428906d5834650bfe6c792d4b092f9d27","original_commit_id":"915d1f6428906d5834650bfe6c792d4b092f9d27","user":{"login":"coolme200","id":1400114,"avatar_url":"https://avatars.githubusercontent.com/u/1400114?v=3","gravatar_id":"","url":"https://api.github.com/users/coolme200","html_url":"https://github.com/coolme200","followers_url":"https://api.github.com/users/coolme200/followers","following_url":"https://api.github.com/users/coolme200/following{/other_user}","gists_url":"https://api.github.com/users/coolme200/gists{/gist_id}","starred_url":"https://api.github.com/users/coolme200/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolme200/subscriptions","organizations_url":"https://api.github.com/users/coolme200/orgs","repos_url":"https://api.github.com/users/coolme200/repos","events_url":"https://api.github.com/users/coolme200/events{/privacy}","received_events_url":"https://api.github.com/users/coolme200/received_events","type":"User","site_admin":false},"body":"我们传过去可以指定最简单的类型，但是反序列化出来却一定是 `{value: x}` 这个是最麻烦的。","created_at":"2016-03-09T14:24:57Z","updated_at":"2016-03-09T14:24:57Z","html_url":"https://github.com/node-modules/js-to-java/pull/33#discussion_r55524597","pull_request_url":"https://api.github.com/repos/node-modules/js-to-java/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/node-modules/js-to-java/pulls/comments/55524597"},"html":{"href":"https://github.com/node-modules/js-to-java/pull/33#discussion_r55524597"},"pull_request":{"href":"https://api.github.com/repos/node-modules/js-to-java/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/node-modules/js-to-java/pulls/33","id":62205996,"html_url":"https://github.com/node-modules/js-to-java/pull/33","diff_url":"https://github.com/node-modules/js-to-java/pull/33.diff","patch_url":"https://github.com/node-modules/js-to-java/pull/33.patch","issue_url":"https://api.github.com/repos/node-modules/js-to-java/issues/33","number":33,"state":"open","locked":false,"title":"fix: bigdecimal support {value}","user":{"login":"coolme200","id":1400114,"avatar_url":"https://avatars.githubusercontent.com/u/1400114?v=3","gravatar_id":"","url":"https://api.github.com/users/coolme200","html_url":"https://github.com/coolme200","followers_url":"https://api.github.com/users/coolme200/followers","following_url":"https://api.github.com/users/coolme200/following{/other_user}","gists_url":"https://api.github.com/users/coolme200/gists{/gist_id}","starred_url":"https://api.github.com/users/coolme200/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolme200/subscriptions","organizations_url":"https://api.github.com/users/coolme200/orgs","repos_url":"https://api.github.com/users/coolme200/repos","events_url":"https://api.github.com/users/coolme200/events{/privacy}","received_events_url":"https://api.github.com/users/coolme200/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-09T10:15:36Z","updated_at":"2016-03-09T14:24:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e8fe26d9ada6371589ac9e8476ba6cf4d1b8a90","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/node-modules/js-to-java/pulls/33/commits","review_comments_url":"https://api.github.com/repos/node-modules/js-to-java/pulls/33/comments","review_comment_url":"https://api.github.com/repos/node-modules/js-to-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/node-modules/js-to-java/issues/33/comments","statuses_url":"https://api.github.com/repos/node-modules/js-to-java/statuses/915d1f6428906d5834650bfe6c792d4b092f9d27","head":{"label":"node-modules:fix-bigdecimal","ref":"fix-bigdecimal","sha":"915d1f6428906d5834650bfe6c792d4b092f9d27","user":{"login":"node-modules","id":7125868,"avatar_url":"https://avatars.githubusercontent.com/u/7125868?v=3","gravatar_id":"","url":"https://api.github.com/users/node-modules","html_url":"https://github.com/node-modules","followers_url":"https://api.github.com/users/node-modules/followers","following_url":"https://api.github.com/users/node-modules/following{/other_user}","gists_url":"https://api.github.com/users/node-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/node-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-modules/subscriptions","organizations_url":"https://api.github.com/users/node-modules/orgs","repos_url":"https://api.github.com/users/node-modules/repos","events_url":"https://api.github.com/users/node-modules/events{/privacy}","received_events_url":"https://api.github.com/users/node-modules/received_events","type":"Organization","site_admin":false},"repo":{"id":17893974,"name":"js-to-java","full_name":"node-modules/js-to-java","owner":{"login":"node-modules","id":7125868,"avatar_url":"https://avatars.githubusercontent.com/u/7125868?v=3","gravatar_id":"","url":"https://api.github.com/users/node-modules","html_url":"https://github.com/node-modules","followers_url":"https://api.github.com/users/node-modules/followers","following_url":"https://api.github.com/users/node-modules/following{/other_user}","gists_url":"https://api.github.com/users/node-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/node-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-modules/subscriptions","organizations_url":"https://api.github.com/users/node-modules/orgs","repos_url":"https://api.github.com/users/node-modules/repos","events_url":"https://api.github.com/users/node-modules/events{/privacy}","received_events_url":"https://api.github.com/users/node-modules/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/node-modules/js-to-java","description":"easy way to wrap js object to java object","fork":false,"url":"https://api.github.com/repos/node-modules/js-to-java","forks_url":"https://api.github.com/repos/node-modules/js-to-java/forks","keys_url":"https://api.github.com/repos/node-modules/js-to-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/node-modules/js-to-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/node-modules/js-to-java/teams","hooks_url":"https://api.github.com/repos/node-modules/js-to-java/hooks","issue_events_url":"https://api.github.com/repos/node-modules/js-to-java/issues/events{/number}","events_url":"https://api.github.com/repos/node-modules/js-to-java/events","assignees_url":"https://api.github.com/repos/node-modules/js-to-java/assignees{/user}","branches_url":"https://api.github.com/repos/node-modules/js-to-java/branches{/branch}","tags_url":"https://api.github.com/repos/node-modules/js-to-java/tags","blobs_url":"https://api.github.com/repos/node-modules/js-to-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/node-modules/js-to-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/node-modules/js-to-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/node-modules/js-to-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/node-modules/js-to-java/statuses/{sha}","languages_url":"https://api.github.com/repos/node-modules/js-to-java/languages","stargazers_url":"https://api.github.com/repos/node-modules/js-to-java/stargazers","contributors_url":"https://api.github.com/repos/node-modules/js-to-java/contributors","subscribers_url":"https://api.github.com/repos/node-modules/js-to-java/subscribers","subscription_url":"https://api.github.com/repos/node-modules/js-to-java/subscription","commits_url":"https://api.github.com/repos/node-modules/js-to-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/node-modules/js-to-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/node-modules/js-to-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/node-modules/js-to-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/node-modules/js-to-java/contents/{+path}","compare_url":"https://api.github.com/repos/node-modules/js-to-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/node-modules/js-to-java/merges","archive_url":"https://api.github.com/repos/node-modules/js-to-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/node-modules/js-to-java/downloads","issues_url":"https://api.github.com/repos/node-modules/js-to-java/issues{/number}","pulls_url":"https://api.github.com/repos/node-modules/js-to-java/pulls{/number}","milestones_url":"https://api.github.com/repos/node-modules/js-to-java/milestones{/number}","notifications_url":"https://api.github.com/repos/node-modules/js-to-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/node-modules/js-to-java/labels{/name}","releases_url":"https://api.github.com/repos/node-modules/js-to-java/releases{/id}","deployments_url":"https://api.github.com/repos/node-modules/js-to-java/deployments","created_at":"2014-03-19T06:04:42Z","updated_at":"2016-02-25T02:26:24Z","pushed_at":"2016-03-09T10:15:36Z","git_url":"git://github.com/node-modules/js-to-java.git","ssh_url":"git@github.com:node-modules/js-to-java.git","clone_url":"https://github.com/node-modules/js-to-java.git","svn_url":"https://github.com/node-modules/js-to-java","homepage":null,"size":49,"stargazers_count":28,"watchers_count":28,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":28,"default_branch":"master"}},"base":{"label":"node-modules:master","ref":"master","sha":"6ecb569d56e5ab215ca716fb4360fbacbd2c0e92","user":{"login":"node-modules","id":7125868,"avatar_url":"https://avatars.githubusercontent.com/u/7125868?v=3","gravatar_id":"","url":"https://api.github.com/users/node-modules","html_url":"https://github.com/node-modules","followers_url":"https://api.github.com/users/node-modules/followers","following_url":"https://api.github.com/users/node-modules/following{/other_user}","gists_url":"https://api.github.com/users/node-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/node-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-modules/subscriptions","organizations_url":"https://api.github.com/users/node-modules/orgs","repos_url":"https://api.github.com/users/node-modules/repos","events_url":"https://api.github.com/users/node-modules/events{/privacy}","received_events_url":"https://api.github.com/users/node-modules/received_events","type":"Organization","site_admin":false},"repo":{"id":17893974,"name":"js-to-java","full_name":"node-modules/js-to-java","owner":{"login":"node-modules","id":7125868,"avatar_url":"https://avatars.githubusercontent.com/u/7125868?v=3","gravatar_id":"","url":"https://api.github.com/users/node-modules","html_url":"https://github.com/node-modules","followers_url":"https://api.github.com/users/node-modules/followers","following_url":"https://api.github.com/users/node-modules/following{/other_user}","gists_url":"https://api.github.com/users/node-modules/gists{/gist_id}","starred_url":"https://api.github.com/users/node-modules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/node-modules/subscriptions","organizations_url":"https://api.github.com/users/node-modules/orgs","repos_url":"https://api.github.com/users/node-modules/repos","events_url":"https://api.github.com/users/node-modules/events{/privacy}","received_events_url":"https://api.github.com/users/node-modules/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/node-modules/js-to-java","description":"easy way to wrap js object to java object","fork":false,"url":"https://api.github.com/repos/node-modules/js-to-java","forks_url":"https://api.github.com/repos/node-modules/js-to-java/forks","keys_url":"https://api.github.com/repos/node-modules/js-to-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/node-modules/js-to-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/node-modules/js-to-java/teams","hooks_url":"https://api.github.com/repos/node-modules/js-to-java/hooks","issue_events_url":"https://api.github.com/repos/node-modules/js-to-java/issues/events{/number}","events_url":"https://api.github.com/repos/node-modules/js-to-java/events","assignees_url":"https://api.github.com/repos/node-modules/js-to-java/assignees{/user}","branches_url":"https://api.github.com/repos/node-modules/js-to-java/branches{/branch}","tags_url":"https://api.github.com/repos/node-modules/js-to-java/tags","blobs_url":"https://api.github.com/repos/node-modules/js-to-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/node-modules/js-to-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/node-modules/js-to-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/node-modules/js-to-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/node-modules/js-to-java/statuses/{sha}","languages_url":"https://api.github.com/repos/node-modules/js-to-java/languages","stargazers_url":"https://api.github.com/repos/node-modules/js-to-java/stargazers","contributors_url":"https://api.github.com/repos/node-modules/js-to-java/contributors","subscribers_url":"https://api.github.com/repos/node-modules/js-to-java/subscribers","subscription_url":"https://api.github.com/repos/node-modules/js-to-java/subscription","commits_url":"https://api.github.com/repos/node-modules/js-to-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/node-modules/js-to-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/node-modules/js-to-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/node-modules/js-to-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/node-modules/js-to-java/contents/{+path}","compare_url":"https://api.github.com/repos/node-modules/js-to-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/node-modules/js-to-java/merges","archive_url":"https://api.github.com/repos/node-modules/js-to-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/node-modules/js-to-java/downloads","issues_url":"https://api.github.com/repos/node-modules/js-to-java/issues{/number}","pulls_url":"https://api.github.com/repos/node-modules/js-to-java/pulls{/number}","milestones_url":"https://api.github.com/repos/node-modules/js-to-java/milestones{/number}","notifications_url":"https://api.github.com/repos/node-modules/js-to-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/node-modules/js-to-java/labels{/name}","releases_url":"https://api.github.com/repos/node-modules/js-to-java/releases{/id}","deployments_url":"https://api.github.com/repos/node-modules/js-to-java/deployments","created_at":"2014-03-19T06:04:42Z","updated_at":"2016-02-25T02:26:24Z","pushed_at":"2016-03-09T10:15:36Z","git_url":"git://github.com/node-modules/js-to-java.git","ssh_url":"git@github.com:node-modules/js-to-java.git","clone_url":"https://github.com/node-modules/js-to-java.git","svn_url":"https://github.com/node-modules/js-to-java","homepage":null,"size":49,"stargazers_count":28,"watchers_count":28,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/node-modules/js-to-java/pulls/33"},"html":{"href":"https://github.com/node-modules/js-to-java/pull/33"},"issue":{"href":"https://api.github.com/repos/node-modules/js-to-java/issues/33"},"comments":{"href":"https://api.github.com/repos/node-modules/js-to-java/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/node-modules/js-to-java/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/node-modules/js-to-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/node-modules/js-to-java/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/node-modules/js-to-java/statuses/915d1f6428906d5834650bfe6c792d4b092f9d27"}}}}