{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/dnx/pulls/comments/29984158","id":29984158,"diff_hunk":"@@ -0,0 +1,312 @@\n+﻿// Copyright (c) .NET Foundation. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+using System;\n+using System.Globalization;\n+using System.IO;\n+using System.Text;\n+\n+namespace Microsoft.Framework.Runtime.Json\n+{\n+    internal class JsonBuffer\n+    {\n+        private readonly TextReader _reader;\n+        private JsonToken _token;\n+        private int _line;\n+        private int _column;\n+\n+        public JsonBuffer(TextReader reader)\n+        {\n+            _reader = reader;\n+            _line = 1;\n+        }\n+\n+        public JsonToken Read()\n+        {\n+            int first;\n+            while (true)\n+            {\n+                first = ReadNextChar();\n+\n+                if (first == -1)\n+                {\n+                    _token.Type = JsonTokenType.EOL;\n+                    return _token;\n+                }\n+                else if (!IsWhitespace(first))\n+                {\n+                    break;\n+                }\n+            }\n+\n+            _token.Value = null;\n+            _token.Line = _line;\n+            _token.Column = _column;\n+\n+            if (first == '{')\n+            {\n+                _token.Type = JsonTokenType.LeftCurlyBracket;\n+            }\n+            else if (first == '}')\n+            {\n+                _token.Type = JsonTokenType.RightCurlyBracket;\n+            }\n+            else if (first == '[')\n+            {\n+                _token.Type = JsonTokenType.LeftSquareBracket;\n+            }\n+            else if (first == ']')\n+            {\n+                _token.Type = JsonTokenType.RightSquareBracket;\n+            }\n+            else if (first == ':')\n+            {\n+                _token.Type = JsonTokenType.Colon;\n+            }\n+            else if (first == ',')\n+            {\n+                _token.Type = JsonTokenType.Comma;\n+            }\n+            else if (first == '\"')\n+            {\n+                _token.Type = JsonTokenType.String;\n+                _token.Value = ReadString();\n+            }\n+            else if (first == 't')\n+            {\n+                ReadLiteral(JsonConstants.ValueTrue);\n+                _token.Type = JsonTokenType.True;\n+            }\n+            else if (first == 'f')\n+            {\n+                ReadLiteral(JsonConstants.ValueFalse);\n+                _token.Type = JsonTokenType.False;\n+            }\n+            else if (first == 'n')\n+            {\n+                ReadLiteral(JsonConstants.ValueNull);\n+                _token.Type = JsonTokenType.Null;\n+            }\n+            else if ((first >= '0' && first <= '9') || first == '-')","path":"src/Microsoft.Framework.Runtime.Hosting/Json/JsonBuffer.cs","position":90,"original_position":90,"commit_id":"e4ee7963f5b0718a8f484ff0d28ae138648e8d05","original_commit_id":"36c6c68c1e63d1d5ec4690e7deca1d8c2ed4cb48","user":{"login":"ChengTian","id":1383883,"avatar_url":"https://avatars.githubusercontent.com/u/1383883?v=3","gravatar_id":"","url":"https://api.github.com/users/ChengTian","html_url":"https://github.com/ChengTian","followers_url":"https://api.github.com/users/ChengTian/followers","following_url":"https://api.github.com/users/ChengTian/following{/other_user}","gists_url":"https://api.github.com/users/ChengTian/gists{/gist_id}","starred_url":"https://api.github.com/users/ChengTian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChengTian/subscriptions","organizations_url":"https://api.github.com/users/ChengTian/orgs","repos_url":"https://api.github.com/users/ChengTian/repos","events_url":"https://api.github.com/users/ChengTian/events{/privacy}","received_events_url":"https://api.github.com/users/ChengTian/received_events","type":"User","site_admin":false},"body":"Yeah, let's throw inside JsonNumber. It's not complicated if we do it there.","created_at":"2015-05-08T23:12:27Z","updated_at":"2015-05-08T23:12:27Z","html_url":"https://github.com/aspnet/dnx/pull/1779#discussion_r29984158","pull_request_url":"https://api.github.com/repos/aspnet/dnx/pulls/1779","_links":{"self":{"href":"https://api.github.com/repos/aspnet/dnx/pulls/comments/29984158"},"html":{"href":"https://github.com/aspnet/dnx/pull/1779#discussion_r29984158"},"pull_request":{"href":"https://api.github.com/repos/aspnet/dnx/pulls/1779"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/dnx/pulls/1779","id":34687198,"html_url":"https://github.com/aspnet/dnx/pull/1779","diff_url":"https://github.com/aspnet/dnx/pull/1779.diff","patch_url":"https://github.com/aspnet/dnx/pull/1779.patch","issue_url":"https://api.github.com/repos/aspnet/dnx/issues/1779","number":1779,"state":"open","locked":false,"title":"[Prototype] Use JsonDeserializer in Microsoft.Framework.Runtime","user":{"login":"troydai","id":1329240,"avatar_url":"https://avatars.githubusercontent.com/u/1329240?v=3","gravatar_id":"","url":"https://api.github.com/users/troydai","html_url":"https://github.com/troydai","followers_url":"https://api.github.com/users/troydai/followers","following_url":"https://api.github.com/users/troydai/following{/other_user}","gists_url":"https://api.github.com/users/troydai/gists{/gist_id}","starred_url":"https://api.github.com/users/troydai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troydai/subscriptions","organizations_url":"https://api.github.com/users/troydai/orgs","repos_url":"https://api.github.com/users/troydai/repos","events_url":"https://api.github.com/users/troydai/events{/privacy}","received_events_url":"https://api.github.com/users/troydai/received_events","type":"User","site_admin":false},"body":"Address issue: #30\r\n\r\n`JsonDeserializer` is entirely internal to `Microsoft.Framework.Runtime`.\r\n\r\nLogic of writing lock file is moved to `Microsoft.Framework.PackageManager`, where `Newtonsoft.Json` will be referenced.\r\n\r\nAll exceptions are updated.\r\n\r\nUnit tests are added to covert `JsonDeserializer`","created_at":"2015-05-05T00:04:57Z","updated_at":"2015-05-08T23:12:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6dce741a01265c50a8a09c5c0a9093cd56e44e7d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/dnx/pulls/1779/commits","review_comments_url":"https://api.github.com/repos/aspnet/dnx/pulls/1779/comments","review_comment_url":"https://api.github.com/repos/aspnet/dnx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/dnx/issues/1779/comments","statuses_url":"https://api.github.com/repos/aspnet/dnx/statuses/e4ee7963f5b0718a8f484ff0d28ae138648e8d05","head":{"label":"aspnet:trdai/json","ref":"trdai/json","sha":"e4ee7963f5b0718a8f484ff0d28ae138648e8d05","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":14225208,"name":"dnx","full_name":"aspnet/dnx","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/dnx","description":"The DNX (a .NET Execution Environment) contains the code required to bootstrap and run an application, including the compilation system, SDK tools, and the native CLR hosts.","fork":false,"url":"https://api.github.com/repos/aspnet/dnx","forks_url":"https://api.github.com/repos/aspnet/dnx/forks","keys_url":"https://api.github.com/repos/aspnet/dnx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/dnx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/dnx/teams","hooks_url":"https://api.github.com/repos/aspnet/dnx/hooks","issue_events_url":"https://api.github.com/repos/aspnet/dnx/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/dnx/events","assignees_url":"https://api.github.com/repos/aspnet/dnx/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/dnx/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/dnx/tags","blobs_url":"https://api.github.com/repos/aspnet/dnx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/dnx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/dnx/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/dnx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/dnx/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/dnx/languages","stargazers_url":"https://api.github.com/repos/aspnet/dnx/stargazers","contributors_url":"https://api.github.com/repos/aspnet/dnx/contributors","subscribers_url":"https://api.github.com/repos/aspnet/dnx/subscribers","subscription_url":"https://api.github.com/repos/aspnet/dnx/subscription","commits_url":"https://api.github.com/repos/aspnet/dnx/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/dnx/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/dnx/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/dnx/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/dnx/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/dnx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/dnx/merges","archive_url":"https://api.github.com/repos/aspnet/dnx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/dnx/downloads","issues_url":"https://api.github.com/repos/aspnet/dnx/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/dnx/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/dnx/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/dnx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/dnx/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/dnx/releases{/id}","created_at":"2013-11-08T06:01:29Z","updated_at":"2015-05-08T20:46:27Z","pushed_at":"2015-05-08T22:57:50Z","git_url":"git://github.com/aspnet/dnx.git","ssh_url":"git@github.com:aspnet/dnx.git","clone_url":"https://github.com/aspnet/dnx.git","svn_url":"https://github.com/aspnet/dnx","homepage":"","size":47451,"stargazers_count":660,"watchers_count":660,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":153,"mirror_url":null,"open_issues_count":317,"forks":153,"open_issues":317,"watchers":660,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"ce597a99c5af8f8069d4a99499f77fbe2f730d24","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":14225208,"name":"dnx","full_name":"aspnet/dnx","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/dnx","description":"The DNX (a .NET Execution Environment) contains the code required to bootstrap and run an application, including the compilation system, SDK tools, and the native CLR hosts.","fork":false,"url":"https://api.github.com/repos/aspnet/dnx","forks_url":"https://api.github.com/repos/aspnet/dnx/forks","keys_url":"https://api.github.com/repos/aspnet/dnx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/dnx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/dnx/teams","hooks_url":"https://api.github.com/repos/aspnet/dnx/hooks","issue_events_url":"https://api.github.com/repos/aspnet/dnx/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/dnx/events","assignees_url":"https://api.github.com/repos/aspnet/dnx/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/dnx/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/dnx/tags","blobs_url":"https://api.github.com/repos/aspnet/dnx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/dnx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/dnx/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/dnx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/dnx/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/dnx/languages","stargazers_url":"https://api.github.com/repos/aspnet/dnx/stargazers","contributors_url":"https://api.github.com/repos/aspnet/dnx/contributors","subscribers_url":"https://api.github.com/repos/aspnet/dnx/subscribers","subscription_url":"https://api.github.com/repos/aspnet/dnx/subscription","commits_url":"https://api.github.com/repos/aspnet/dnx/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/dnx/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/dnx/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/dnx/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/dnx/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/dnx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/dnx/merges","archive_url":"https://api.github.com/repos/aspnet/dnx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/dnx/downloads","issues_url":"https://api.github.com/repos/aspnet/dnx/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/dnx/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/dnx/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/dnx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/dnx/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/dnx/releases{/id}","created_at":"2013-11-08T06:01:29Z","updated_at":"2015-05-08T20:46:27Z","pushed_at":"2015-05-08T22:57:50Z","git_url":"git://github.com/aspnet/dnx.git","ssh_url":"git@github.com:aspnet/dnx.git","clone_url":"https://github.com/aspnet/dnx.git","svn_url":"https://github.com/aspnet/dnx","homepage":"","size":47451,"stargazers_count":660,"watchers_count":660,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":153,"mirror_url":null,"open_issues_count":317,"forks":153,"open_issues":317,"watchers":660,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/dnx/pulls/1779"},"html":{"href":"https://github.com/aspnet/dnx/pull/1779"},"issue":{"href":"https://api.github.com/repos/aspnet/dnx/issues/1779"},"comments":{"href":"https://api.github.com/repos/aspnet/dnx/issues/1779/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/dnx/pulls/1779/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/dnx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/dnx/pulls/1779/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/dnx/statuses/e4ee7963f5b0718a8f484ff0d28ae138648e8d05"}}}}