{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/Mvc/pulls/comments/25084983","id":25084983,"diff_hunk":"@@ -0,0 +1,51 @@\n+﻿// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+var Mvc = (function ($) {\n+\n+    // This holds the stringified result.\n+    var result = \"\";\n+\n+    // Takes the data which needs to be converted to MVC understandable format.\n+    var _stringify = function (data) {\n+        result = \"\";\n+        for (var element in data) {\n+            Process(element, data[element], null);\n+        }\n+\n+        // An '&' is appended at the end. Removing it.\n+        return result.slice(0, -1);\n+    }\n+\n+    function Process(key, value, prefix) {\n+        // Ignore functions.\n+        if ($.isFunction(value)) {\n+            return;\n+        }\n+\n+        if ($.isArray(value)) {\n+            for (var i = 0; i < value.length; i++) {\n+                var tempPrefix = (prefix == null ? key : prefix) + \"[\" + i + \"]\";\n+                Process(key, value[i], tempPrefix);\n+            }\n+        }\n+        else if ($.type(value) == \"object\") {\n+            for (var prop in value) {","path":"samples/MvcSample.Web/wwwroot/Scripts/Mvc.js","position":33,"original_position":33,"commit_id":"2f377fff723754caeaa67ed89226368d124e07b0","original_commit_id":"2f377fff723754caeaa67ed89226368d124e07b0","user":{"login":"pranavkm","id":174281,"avatar_url":"https://avatars.githubusercontent.com/u/174281?v=3","gravatar_id":"","url":"https://api.github.com/users/pranavkm","html_url":"https://github.com/pranavkm","followers_url":"https://api.github.com/users/pranavkm/followers","following_url":"https://api.github.com/users/pranavkm/following{/other_user}","gists_url":"https://api.github.com/users/pranavkm/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavkm/subscriptions","organizations_url":"https://api.github.com/users/pranavkm/orgs","repos_url":"https://api.github.com/users/pranavkm/repos","events_url":"https://api.github.com/users/pranavkm/events{/privacy}","received_events_url":"https://api.github.com/users/pranavkm/received_events","type":"User","site_admin":false},"body":"If you plan on using jQuery, use `$.each` instead and remove the `hasOwnProperty` check.","created_at":"2015-02-20T17:12:08Z","updated_at":"2015-02-20T17:12:08Z","html_url":"https://github.com/aspnet/Mvc/pull/2049#discussion_r25084983","pull_request_url":"https://api.github.com/repos/aspnet/Mvc/pulls/2049","_links":{"self":{"href":"https://api.github.com/repos/aspnet/Mvc/pulls/comments/25084983"},"html":{"href":"https://github.com/aspnet/Mvc/pull/2049#discussion_r25084983"},"pull_request":{"href":"https://api.github.com/repos/aspnet/Mvc/pulls/2049"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/Mvc/pulls/2049","id":29706986,"html_url":"https://github.com/aspnet/Mvc/pull/2049","diff_url":"https://github.com/aspnet/Mvc/pull/2049.diff","patch_url":"https://github.com/aspnet/Mvc/pull/2049.patch","issue_url":"https://api.github.com/repos/aspnet/Mvc/issues/2049","number":2049,"state":"open","locked":false,"title":"Introducing Mvc.stringify()","user":{"login":"sornaks","id":6588965,"avatar_url":"https://avatars.githubusercontent.com/u/6588965?v=3","gravatar_id":"","url":"https://api.github.com/users/sornaks","html_url":"https://github.com/sornaks","followers_url":"https://api.github.com/users/sornaks/followers","following_url":"https://api.github.com/users/sornaks/following{/other_user}","gists_url":"https://api.github.com/users/sornaks/gists{/gist_id}","starred_url":"https://api.github.com/users/sornaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sornaks/subscriptions","organizations_url":"https://api.github.com/users/sornaks/orgs","repos_url":"https://api.github.com/users/sornaks/repos","events_url":"https://api.github.com/users/sornaks/events{/privacy}","received_events_url":"https://api.github.com/users/sornaks/received_events","type":"User","site_admin":false},"body":"Including Mvc.js script which enables Mvc.stringify(data) used in JQuery.Post() to send data understandable by MVC.","created_at":"2015-02-20T16:01:54Z","updated_at":"2015-02-20T17:12:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ce0e1bf6b4d6b0ef43db20d2c7cd8366ee24e71","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/Mvc/pulls/2049/commits","review_comments_url":"https://api.github.com/repos/aspnet/Mvc/pulls/2049/comments","review_comment_url":"https://api.github.com/repos/aspnet/Mvc/pulls/comments/{number}","comments_url":"https://api.github.com/repos/aspnet/Mvc/issues/2049/comments","statuses_url":"https://api.github.com/repos/aspnet/Mvc/statuses/2f377fff723754caeaa67ed89226368d124e07b0","head":{"label":"MvcJs","ref":"MvcJs","sha":"2f377fff723754caeaa67ed89226368d124e07b0","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":15126429,"name":"Mvc","full_name":"aspnet/Mvc","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/Mvc","description":"Model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor.","fork":false,"url":"https://api.github.com/repos/aspnet/Mvc","forks_url":"https://api.github.com/repos/aspnet/Mvc/forks","keys_url":"https://api.github.com/repos/aspnet/Mvc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Mvc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Mvc/teams","hooks_url":"https://api.github.com/repos/aspnet/Mvc/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Mvc/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Mvc/events","assignees_url":"https://api.github.com/repos/aspnet/Mvc/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Mvc/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Mvc/tags","blobs_url":"https://api.github.com/repos/aspnet/Mvc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Mvc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Mvc/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Mvc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Mvc/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Mvc/languages","stargazers_url":"https://api.github.com/repos/aspnet/Mvc/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Mvc/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Mvc/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Mvc/subscription","commits_url":"https://api.github.com/repos/aspnet/Mvc/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Mvc/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Mvc/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/{number}","contents_url":"https://api.github.com/repos/aspnet/Mvc/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Mvc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Mvc/merges","archive_url":"https://api.github.com/repos/aspnet/Mvc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Mvc/downloads","issues_url":"https://api.github.com/repos/aspnet/Mvc/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Mvc/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Mvc/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Mvc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Mvc/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Mvc/releases{/id}","created_at":"2013-12-12T03:54:00Z","updated_at":"2015-02-20T16:44:11Z","pushed_at":"2015-02-20T16:36:34Z","git_url":"git://github.com/aspnet/Mvc.git","ssh_url":"git@github.com:aspnet/Mvc.git","clone_url":"https://github.com/aspnet/Mvc.git","svn_url":"https://github.com/aspnet/Mvc","homepage":"","size":79631,"stargazers_count":1389,"watchers_count":1389,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":412,"mirror_url":null,"open_issues_count":228,"forks":412,"open_issues":228,"watchers":1389,"default_branch":"dev"}},"base":{"label":"dev","ref":"dev","sha":"57f5b19f25950ab90669fe9a37bab7941f39892d","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":15126429,"name":"Mvc","full_name":"aspnet/Mvc","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/Mvc","description":"Model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor.","fork":false,"url":"https://api.github.com/repos/aspnet/Mvc","forks_url":"https://api.github.com/repos/aspnet/Mvc/forks","keys_url":"https://api.github.com/repos/aspnet/Mvc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/Mvc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/Mvc/teams","hooks_url":"https://api.github.com/repos/aspnet/Mvc/hooks","issue_events_url":"https://api.github.com/repos/aspnet/Mvc/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/Mvc/events","assignees_url":"https://api.github.com/repos/aspnet/Mvc/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/Mvc/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/Mvc/tags","blobs_url":"https://api.github.com/repos/aspnet/Mvc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/Mvc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/Mvc/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/Mvc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/Mvc/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/Mvc/languages","stargazers_url":"https://api.github.com/repos/aspnet/Mvc/stargazers","contributors_url":"https://api.github.com/repos/aspnet/Mvc/contributors","subscribers_url":"https://api.github.com/repos/aspnet/Mvc/subscribers","subscription_url":"https://api.github.com/repos/aspnet/Mvc/subscription","commits_url":"https://api.github.com/repos/aspnet/Mvc/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/Mvc/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/Mvc/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/Mvc/issues/comments/{number}","contents_url":"https://api.github.com/repos/aspnet/Mvc/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/Mvc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/Mvc/merges","archive_url":"https://api.github.com/repos/aspnet/Mvc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/Mvc/downloads","issues_url":"https://api.github.com/repos/aspnet/Mvc/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/Mvc/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/Mvc/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/Mvc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/Mvc/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/Mvc/releases{/id}","created_at":"2013-12-12T03:54:00Z","updated_at":"2015-02-20T16:44:11Z","pushed_at":"2015-02-20T16:36:34Z","git_url":"git://github.com/aspnet/Mvc.git","ssh_url":"git@github.com:aspnet/Mvc.git","clone_url":"https://github.com/aspnet/Mvc.git","svn_url":"https://github.com/aspnet/Mvc","homepage":"","size":79631,"stargazers_count":1389,"watchers_count":1389,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":412,"mirror_url":null,"open_issues_count":228,"forks":412,"open_issues":228,"watchers":1389,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/Mvc/pulls/2049"},"html":{"href":"https://github.com/aspnet/Mvc/pull/2049"},"issue":{"href":"https://api.github.com/repos/aspnet/Mvc/issues/2049"},"comments":{"href":"https://api.github.com/repos/aspnet/Mvc/issues/2049/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/Mvc/pulls/2049/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/Mvc/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/aspnet/Mvc/pulls/2049/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/Mvc/statuses/2f377fff723754caeaa67ed89226368d124e07b0"}}}}