{"action":"created","comment":{"url":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/comments/63455484","id":63455484,"diff_hunk":"@@ -3,50 +3,51 @@\n using System.IO;\n using System.Linq;\n using System.Text;\n-using Newtonsoft.Json;\n-using Newtonsoft.Json.Linq;\n using System.Diagnostics;\n+using System.Web.Script.Serialization;\n+using System.Collections;\n \n namespace Sdx.Data\n {\n   public class TreeJson : Tree\n   {\n-    private JToken BaseJson { get; set; }\n+    public dynamic BaseJson { get; set; }","path":"Sdx/Data/TreeJson.cs","position":null,"original_position":15,"commit_id":"22c0a7f7578424a727f89a7025bdadfba7736084","original_commit_id":"22c0a7f7578424a727f89a7025bdadfba7736084","user":{"login":"gomo","id":639604,"avatar_url":"https://avatars.githubusercontent.com/u/639604?v=3","gravatar_id":"","url":"https://api.github.com/users/gomo","html_url":"https://github.com/gomo","followers_url":"https://api.github.com/users/gomo/followers","following_url":"https://api.github.com/users/gomo/following{/other_user}","gists_url":"https://api.github.com/users/gomo/gists{/gist_id}","starred_url":"https://api.github.com/users/gomo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomo/subscriptions","organizations_url":"https://api.github.com/users/gomo/orgs","repos_url":"https://api.github.com/users/gomo/repos","events_url":"https://api.github.com/users/gomo/events{/privacy}","received_events_url":"https://api.github.com/users/gomo/received_events","type":"User","site_admin":false},"body":"口頭で話したけど、他のひとのためも含めて書いておきます。\r\n\r\n２点気になりました。\r\n\r\nまず、dynamicである必要があるのか？特に外に公開されるインターフェースに`object`や`dynamic`は特に使わない方がいいです。なぜかというと、せっかく型がしっかりしていてコンパイラが色々な間違いを見つけてくれるのに、それが効かなくなるからです。\r\n\r\n`object`は`dynamic`本当にそれが必要なのか？というのをよく考えて使いましょう。\r\n\r\nもう一点は、publicの必要があるのか？という点です。確認したところ必要ないということなのでprivateにしましょう。全てのメンバー変数とメソッドは全てprivateにしてどうしても必要な時だけprotected/internal/publicを選びましょう。最低限のアクセス権にするのが原則です。とくにC#ではinternal/internal protectというのがあるのでその辺も検討しましょう。今回はprivateでOKかな。\r\n\r\nprivateになるので、dynamicは使ったままでOKです。というかこのシチュエーションはdynamicかobjectを使うしかなさそうではありますね。外に返す時に型チェックが行われるので安全だと思います。\r\n\r\n😇 ","created_at":"2016-05-17T02:06:00Z","updated_at":"2016-05-17T02:06:00Z","html_url":"https://github.com/SunriseDigital/cs-sdx/pull/59#discussion_r63455484","pull_request_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/59","_links":{"self":{"href":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/comments/63455484"},"html":{"href":"https://github.com/SunriseDigital/cs-sdx/pull/59#discussion_r63455484"},"pull_request":{"href":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/59"}}},"pull_request":{"url":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/59","id":67472092,"html_url":"https://github.com/SunriseDigital/cs-sdx/pull/59","diff_url":"https://github.com/SunriseDigital/cs-sdx/pull/59.diff","patch_url":"https://github.com/SunriseDigital/cs-sdx/pull/59.patch","issue_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues/59","number":59,"state":"open","locked":false,"title":"APIへリクエストする","user":{"login":"shimizu-k-digi","id":12838365,"avatar_url":"https://avatars.githubusercontent.com/u/12838365?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizu-k-digi","html_url":"https://github.com/shimizu-k-digi","followers_url":"https://api.github.com/users/shimizu-k-digi/followers","following_url":"https://api.github.com/users/shimizu-k-digi/following{/other_user}","gists_url":"https://api.github.com/users/shimizu-k-digi/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizu-k-digi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizu-k-digi/subscriptions","organizations_url":"https://api.github.com/users/shimizu-k-digi/orgs","repos_url":"https://api.github.com/users/shimizu-k-digi/repos","events_url":"https://api.github.com/users/shimizu-k-digi/events{/privacy}","received_events_url":"https://api.github.com/users/shimizu-k-digi/received_events","type":"User","site_admin":false},"body":"## TODO\r\n- [x] Treeを継承したTreeJsonクラスの実装\r\n\r\n## 備考\r\n~~proj/scaffoldからブランチを切っていて、masterにpullリクエストを出しているのでコミット履歴がおかしいのは気にしないでください\r\nproj/scaffoldがmasterにmargeされたら直ります~~","created_at":"2016-04-22T07:51:46Z","updated_at":"2016-05-17T02:06:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"216078bf9d34ce9f0224f1f9e34d609765f14f81","assignee":{"login":"shimizu-k-digi","id":12838365,"avatar_url":"https://avatars.githubusercontent.com/u/12838365?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizu-k-digi","html_url":"https://github.com/shimizu-k-digi","followers_url":"https://api.github.com/users/shimizu-k-digi/followers","following_url":"https://api.github.com/users/shimizu-k-digi/following{/other_user}","gists_url":"https://api.github.com/users/shimizu-k-digi/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizu-k-digi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizu-k-digi/subscriptions","organizations_url":"https://api.github.com/users/shimizu-k-digi/orgs","repos_url":"https://api.github.com/users/shimizu-k-digi/repos","events_url":"https://api.github.com/users/shimizu-k-digi/events{/privacy}","received_events_url":"https://api.github.com/users/shimizu-k-digi/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/59/commits","review_comments_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/59/comments","review_comment_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues/59/comments","statuses_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/statuses/22c0a7f7578424a727f89a7025bdadfba7736084","head":{"label":"SunriseDigital:proj/apiAccess","ref":"proj/apiAccess","sha":"22c0a7f7578424a727f89a7025bdadfba7736084","user":{"login":"SunriseDigital","id":1920622,"avatar_url":"https://avatars.githubusercontent.com/u/1920622?v=3","gravatar_id":"","url":"https://api.github.com/users/SunriseDigital","html_url":"https://github.com/SunriseDigital","followers_url":"https://api.github.com/users/SunriseDigital/followers","following_url":"https://api.github.com/users/SunriseDigital/following{/other_user}","gists_url":"https://api.github.com/users/SunriseDigital/gists{/gist_id}","starred_url":"https://api.github.com/users/SunriseDigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunriseDigital/subscriptions","organizations_url":"https://api.github.com/users/SunriseDigital/orgs","repos_url":"https://api.github.com/users/SunriseDigital/repos","events_url":"https://api.github.com/users/SunriseDigital/events{/privacy}","received_events_url":"https://api.github.com/users/SunriseDigital/received_events","type":"Organization","site_admin":false},"repo":{"id":37579734,"name":"cs-sdx","full_name":"SunriseDigital/cs-sdx","owner":{"login":"SunriseDigital","id":1920622,"avatar_url":"https://avatars.githubusercontent.com/u/1920622?v=3","gravatar_id":"","url":"https://api.github.com/users/SunriseDigital","html_url":"https://github.com/SunriseDigital","followers_url":"https://api.github.com/users/SunriseDigital/followers","following_url":"https://api.github.com/users/SunriseDigital/following{/other_user}","gists_url":"https://api.github.com/users/SunriseDigital/gists{/gist_id}","starred_url":"https://api.github.com/users/SunriseDigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunriseDigital/subscriptions","organizations_url":"https://api.github.com/users/SunriseDigital/orgs","repos_url":"https://api.github.com/users/SunriseDigital/repos","events_url":"https://api.github.com/users/SunriseDigital/events{/privacy}","received_events_url":"https://api.github.com/users/SunriseDigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SunriseDigital/cs-sdx","description":"","fork":false,"url":"https://api.github.com/repos/SunriseDigital/cs-sdx","forks_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/forks","keys_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/teams","hooks_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/hooks","issue_events_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues/events{/number}","events_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/events","assignees_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/assignees{/user}","branches_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/branches{/branch}","tags_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/tags","blobs_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/refs{/sha}","trees_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/statuses/{sha}","languages_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/languages","stargazers_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/stargazers","contributors_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/contributors","subscribers_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/subscribers","subscription_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/subscription","commits_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/commits{/sha}","git_commits_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/commits{/sha}","comments_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/comments{/number}","issue_comment_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues/comments{/number}","contents_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/contents/{+path}","compare_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/merges","archive_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/downloads","issues_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues{/number}","pulls_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls{/number}","milestones_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/milestones{/number}","notifications_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/labels{/name}","releases_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/releases{/id}","deployments_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/deployments","created_at":"2015-06-17T07:32:47Z","updated_at":"2016-01-28T06:38:56Z","pushed_at":"2016-05-16T08:37:31Z","git_url":"git://github.com/SunriseDigital/cs-sdx.git","ssh_url":"git@github.com:SunriseDigital/cs-sdx.git","clone_url":"https://github.com/SunriseDigital/cs-sdx.git","svn_url":"https://github.com/SunriseDigital/cs-sdx","homepage":"http://www.sunrisedigital.jp/","size":1333,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"SunriseDigital:master","ref":"master","sha":"1b47fd712102d695cb981c0bb614c13618fc6093","user":{"login":"SunriseDigital","id":1920622,"avatar_url":"https://avatars.githubusercontent.com/u/1920622?v=3","gravatar_id":"","url":"https://api.github.com/users/SunriseDigital","html_url":"https://github.com/SunriseDigital","followers_url":"https://api.github.com/users/SunriseDigital/followers","following_url":"https://api.github.com/users/SunriseDigital/following{/other_user}","gists_url":"https://api.github.com/users/SunriseDigital/gists{/gist_id}","starred_url":"https://api.github.com/users/SunriseDigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunriseDigital/subscriptions","organizations_url":"https://api.github.com/users/SunriseDigital/orgs","repos_url":"https://api.github.com/users/SunriseDigital/repos","events_url":"https://api.github.com/users/SunriseDigital/events{/privacy}","received_events_url":"https://api.github.com/users/SunriseDigital/received_events","type":"Organization","site_admin":false},"repo":{"id":37579734,"name":"cs-sdx","full_name":"SunriseDigital/cs-sdx","owner":{"login":"SunriseDigital","id":1920622,"avatar_url":"https://avatars.githubusercontent.com/u/1920622?v=3","gravatar_id":"","url":"https://api.github.com/users/SunriseDigital","html_url":"https://github.com/SunriseDigital","followers_url":"https://api.github.com/users/SunriseDigital/followers","following_url":"https://api.github.com/users/SunriseDigital/following{/other_user}","gists_url":"https://api.github.com/users/SunriseDigital/gists{/gist_id}","starred_url":"https://api.github.com/users/SunriseDigital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunriseDigital/subscriptions","organizations_url":"https://api.github.com/users/SunriseDigital/orgs","repos_url":"https://api.github.com/users/SunriseDigital/repos","events_url":"https://api.github.com/users/SunriseDigital/events{/privacy}","received_events_url":"https://api.github.com/users/SunriseDigital/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SunriseDigital/cs-sdx","description":"","fork":false,"url":"https://api.github.com/repos/SunriseDigital/cs-sdx","forks_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/forks","keys_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/teams","hooks_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/hooks","issue_events_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues/events{/number}","events_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/events","assignees_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/assignees{/user}","branches_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/branches{/branch}","tags_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/tags","blobs_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/refs{/sha}","trees_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/statuses/{sha}","languages_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/languages","stargazers_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/stargazers","contributors_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/contributors","subscribers_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/subscribers","subscription_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/subscription","commits_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/commits{/sha}","git_commits_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/git/commits{/sha}","comments_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/comments{/number}","issue_comment_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues/comments{/number}","contents_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/contents/{+path}","compare_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/merges","archive_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/downloads","issues_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues{/number}","pulls_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls{/number}","milestones_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/milestones{/number}","notifications_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/labels{/name}","releases_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/releases{/id}","deployments_url":"https://api.github.com/repos/SunriseDigital/cs-sdx/deployments","created_at":"2015-06-17T07:32:47Z","updated_at":"2016-01-28T06:38:56Z","pushed_at":"2016-05-16T08:37:31Z","git_url":"git://github.com/SunriseDigital/cs-sdx.git","ssh_url":"git@github.com:SunriseDigital/cs-sdx.git","clone_url":"https://github.com/SunriseDigital/cs-sdx.git","svn_url":"https://github.com/SunriseDigital/cs-sdx","homepage":"http://www.sunrisedigital.jp/","size":1333,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/59"},"html":{"href":"https://github.com/SunriseDigital/cs-sdx/pull/59"},"issue":{"href":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues/59"},"comments":{"href":"https://api.github.com/repos/SunriseDigital/cs-sdx/issues/59/comments"},"review_comments":{"href":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/59/comments"},"review_comment":{"href":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SunriseDigital/cs-sdx/pulls/59/commits"},"statuses":{"href":"https://api.github.com/repos/SunriseDigital/cs-sdx/statuses/22c0a7f7578424a727f89a7025bdadfba7736084"}}}}