{"action":"created","comment":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments/92382096","pull_request_review_id":12894031,"id":92382096,"diff_hunk":"@@ -0,0 +1,53 @@\n+﻿# Unit tests for JsonObject\n+Describe 'JsonObject' -tags \"CI\" {\n+\n+    function ShouldThrow","path":"test/powershell/Modules/Microsoft.PowerShell.Utility/JsonObject.Tests.ps1","position":4,"original_position":4,"commit_id":"52ad2d7d646ad18180740dc1b877d885d0570aee","original_commit_id":"52ad2d7d646ad18180740dc1b877d885d0570aee","user":{"login":"iSazonov","id":22290914,"avatar_url":"https://avatars.githubusercontent.com/u/22290914?v=3","gravatar_id":"","url":"https://api.github.com/users/iSazonov","html_url":"https://github.com/iSazonov","followers_url":"https://api.github.com/users/iSazonov/followers","following_url":"https://api.github.com/users/iSazonov/following{/other_user}","gists_url":"https://api.github.com/users/iSazonov/gists{/gist_id}","starred_url":"https://api.github.com/users/iSazonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iSazonov/subscriptions","organizations_url":"https://api.github.com/users/iSazonov/orgs","repos_url":"https://api.github.com/users/iSazonov/repos","events_url":"https://api.github.com/users/iSazonov/events{/privacy}","received_events_url":"https://api.github.com/users/iSazonov/received_events","type":"User","site_admin":false},"body":"Please use the [template with FullyQualifiedErrorId](https://github.com/PowerShell/PowerShell/blob/611f7f9b77f7bb336bc4c4069135eac8520bb77a/docs/testing-guidelines/WritingPesterTests.md#L54) to check for proper errors\r\n```\r\nit \"Get-Item on a nonexisting file should have error PathNotFound\" {\r\n    try\r\n    {\r\n        get-item \"ThisFileCannotPossiblyExist\" -ErrorAction Stop\r\n        throw \"No Exception!\"\r\n    }\r\n    catch\r\n    {\r\n        $_.FullyQualifiedErrorId | should be \"PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand\"\r\n    }\r\n}\r\n```\r\nAnd see my comment about `testcase`.","created_at":"2016-12-14T12:24:49Z","updated_at":"2016-12-14T12:39:45Z","html_url":"https://github.com/PowerShell/PowerShell/pull/2862#discussion_r92382096","pull_request_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2862","_links":{"self":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments/92382096"},"html":{"href":"https://github.com/PowerShell/PowerShell/pull/2862#discussion_r92382096"},"pull_request":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2862"}}},"pull_request":{"url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2862","id":97234727,"html_url":"https://github.com/PowerShell/PowerShell/pull/2862","diff_url":"https://github.com/PowerShell/PowerShell/pull/2862.diff","patch_url":"https://github.com/PowerShell/PowerShell/pull/2862.patch","issue_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2862","number":2862,"state":"open","locked":false,"title":"Invoke-RestMethod cmdlet error if the response is neither JSON nor XML","user":{"login":"2xmax","id":2508022,"avatar_url":"https://avatars.githubusercontent.com/u/2508022?v=3","gravatar_id":"","url":"https://api.github.com/users/2xmax","html_url":"https://github.com/2xmax","followers_url":"https://api.github.com/users/2xmax/followers","following_url":"https://api.github.com/users/2xmax/following{/other_user}","gists_url":"https://api.github.com/users/2xmax/gists{/gist_id}","starred_url":"https://api.github.com/users/2xmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2xmax/subscriptions","organizations_url":"https://api.github.com/users/2xmax/orgs","repos_url":"https://api.github.com/users/2xmax/repos","events_url":"https://api.github.com/users/2xmax/events{/privacy}","received_events_url":"https://api.github.com/users/2xmax/received_events","type":"User","site_admin":false},"body":"This pull request fixes the Invoke-RestMethod cmdlet behavior if the response is neither XML nor JSON, e.g. just a plain text from a webservice.\r\n\r\n**Before the change:**\r\n```\r\nPS> Invoke-RestMethod http://httpbin.org/encoding/utf8\r\nInvoke-RestMethod : Unexpected character encountered while parsing value: <. Path '', line 0, position 0.\r\nAt line:1 char:1\r\n+ Invoke-RestMethod http://httpbin.org/encoding/utf8\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n  + CategoryInfo : NotSpecified: (:) [Invoke-RestMethod], JsonReaderException\r\n  + FullyQualifiedErrorId : Newtonsoft.Json.JsonReaderException,Microsoft.PowerShell.Commands.InvokeRestMethodComman\r\n  d\r\n```\r\n**After the change:**\r\n```\r\nPS> Invoke-RestMethod http://httpbin.org/encoding/utf8\r\n<h1>Unicode Demo</h1>\r\n...\r\n```","created_at":"2016-12-09T01:22:27Z","updated_at":"2016-12-14T12:39:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"290967181c3e15cdd30eac591c93cfd3fa5d4751","assignee":{"login":"daxian-dbw","id":127450,"avatar_url":"https://avatars.githubusercontent.com/u/127450?v=3","gravatar_id":"","url":"https://api.github.com/users/daxian-dbw","html_url":"https://github.com/daxian-dbw","followers_url":"https://api.github.com/users/daxian-dbw/followers","following_url":"https://api.github.com/users/daxian-dbw/following{/other_user}","gists_url":"https://api.github.com/users/daxian-dbw/gists{/gist_id}","starred_url":"https://api.github.com/users/daxian-dbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daxian-dbw/subscriptions","organizations_url":"https://api.github.com/users/daxian-dbw/orgs","repos_url":"https://api.github.com/users/daxian-dbw/repos","events_url":"https://api.github.com/users/daxian-dbw/events{/privacy}","received_events_url":"https://api.github.com/users/daxian-dbw/received_events","type":"User","site_admin":false},"assignees":[{"login":"daxian-dbw","id":127450,"avatar_url":"https://avatars.githubusercontent.com/u/127450?v=3","gravatar_id":"","url":"https://api.github.com/users/daxian-dbw","html_url":"https://github.com/daxian-dbw","followers_url":"https://api.github.com/users/daxian-dbw/followers","following_url":"https://api.github.com/users/daxian-dbw/following{/other_user}","gists_url":"https://api.github.com/users/daxian-dbw/gists{/gist_id}","starred_url":"https://api.github.com/users/daxian-dbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daxian-dbw/subscriptions","organizations_url":"https://api.github.com/users/daxian-dbw/orgs","repos_url":"https://api.github.com/users/daxian-dbw/repos","events_url":"https://api.github.com/users/daxian-dbw/events{/privacy}","received_events_url":"https://api.github.com/users/daxian-dbw/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2862/commits","review_comments_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2862/comments","review_comment_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/2862/comments","statuses_url":"https://api.github.com/repos/PowerShell/PowerShell/statuses/52ad2d7d646ad18180740dc1b877d885d0570aee","head":{"label":"2xmax:irm-fix","ref":"irm-fix","sha":"52ad2d7d646ad18180740dc1b877d885d0570aee","user":{"login":"2xmax","id":2508022,"avatar_url":"https://avatars.githubusercontent.com/u/2508022?v=3","gravatar_id":"","url":"https://api.github.com/users/2xmax","html_url":"https://github.com/2xmax","followers_url":"https://api.github.com/users/2xmax/followers","following_url":"https://api.github.com/users/2xmax/following{/other_user}","gists_url":"https://api.github.com/users/2xmax/gists{/gist_id}","starred_url":"https://api.github.com/users/2xmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2xmax/subscriptions","organizations_url":"https://api.github.com/users/2xmax/orgs","repos_url":"https://api.github.com/users/2xmax/repos","events_url":"https://api.github.com/users/2xmax/events{/privacy}","received_events_url":"https://api.github.com/users/2xmax/received_events","type":"User","site_admin":false},"repo":{"id":75984817,"name":"PowerShell","full_name":"2xmax/PowerShell","owner":{"login":"2xmax","id":2508022,"avatar_url":"https://avatars.githubusercontent.com/u/2508022?v=3","gravatar_id":"","url":"https://api.github.com/users/2xmax","html_url":"https://github.com/2xmax","followers_url":"https://api.github.com/users/2xmax/followers","following_url":"https://api.github.com/users/2xmax/following{/other_user}","gists_url":"https://api.github.com/users/2xmax/gists{/gist_id}","starred_url":"https://api.github.com/users/2xmax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2xmax/subscriptions","organizations_url":"https://api.github.com/users/2xmax/orgs","repos_url":"https://api.github.com/users/2xmax/repos","events_url":"https://api.github.com/users/2xmax/events{/privacy}","received_events_url":"https://api.github.com/users/2xmax/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/2xmax/PowerShell","description":"PowerShell for every system!","fork":true,"url":"https://api.github.com/repos/2xmax/PowerShell","forks_url":"https://api.github.com/repos/2xmax/PowerShell/forks","keys_url":"https://api.github.com/repos/2xmax/PowerShell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2xmax/PowerShell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2xmax/PowerShell/teams","hooks_url":"https://api.github.com/repos/2xmax/PowerShell/hooks","issue_events_url":"https://api.github.com/repos/2xmax/PowerShell/issues/events{/number}","events_url":"https://api.github.com/repos/2xmax/PowerShell/events","assignees_url":"https://api.github.com/repos/2xmax/PowerShell/assignees{/user}","branches_url":"https://api.github.com/repos/2xmax/PowerShell/branches{/branch}","tags_url":"https://api.github.com/repos/2xmax/PowerShell/tags","blobs_url":"https://api.github.com/repos/2xmax/PowerShell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2xmax/PowerShell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2xmax/PowerShell/git/refs{/sha}","trees_url":"https://api.github.com/repos/2xmax/PowerShell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2xmax/PowerShell/statuses/{sha}","languages_url":"https://api.github.com/repos/2xmax/PowerShell/languages","stargazers_url":"https://api.github.com/repos/2xmax/PowerShell/stargazers","contributors_url":"https://api.github.com/repos/2xmax/PowerShell/contributors","subscribers_url":"https://api.github.com/repos/2xmax/PowerShell/subscribers","subscription_url":"https://api.github.com/repos/2xmax/PowerShell/subscription","commits_url":"https://api.github.com/repos/2xmax/PowerShell/commits{/sha}","git_commits_url":"https://api.github.com/repos/2xmax/PowerShell/git/commits{/sha}","comments_url":"https://api.github.com/repos/2xmax/PowerShell/comments{/number}","issue_comment_url":"https://api.github.com/repos/2xmax/PowerShell/issues/comments{/number}","contents_url":"https://api.github.com/repos/2xmax/PowerShell/contents/{+path}","compare_url":"https://api.github.com/repos/2xmax/PowerShell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2xmax/PowerShell/merges","archive_url":"https://api.github.com/repos/2xmax/PowerShell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2xmax/PowerShell/downloads","issues_url":"https://api.github.com/repos/2xmax/PowerShell/issues{/number}","pulls_url":"https://api.github.com/repos/2xmax/PowerShell/pulls{/number}","milestones_url":"https://api.github.com/repos/2xmax/PowerShell/milestones{/number}","notifications_url":"https://api.github.com/repos/2xmax/PowerShell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2xmax/PowerShell/labels{/name}","releases_url":"https://api.github.com/repos/2xmax/PowerShell/releases{/id}","deployments_url":"https://api.github.com/repos/2xmax/PowerShell/deployments","created_at":"2016-12-08T23:50:20Z","updated_at":"2016-12-08T23:50:28Z","pushed_at":"2016-12-14T05:38:29Z","git_url":"git://github.com/2xmax/PowerShell.git","ssh_url":"git@github.com:2xmax/PowerShell.git","clone_url":"https://github.com/2xmax/PowerShell.git","svn_url":"https://github.com/2xmax/PowerShell","homepage":"https://microsoft.com/powershell","size":21719,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"PowerShell:master","ref":"master","sha":"38977a27eabc725ca68cb969d5ce220c80a03bc2","user":{"login":"PowerShell","id":11524380,"avatar_url":"https://avatars.githubusercontent.com/u/11524380?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShell","html_url":"https://github.com/PowerShell","followers_url":"https://api.github.com/users/PowerShell/followers","following_url":"https://api.github.com/users/PowerShell/following{/other_user}","gists_url":"https://api.github.com/users/PowerShell/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShell/subscriptions","organizations_url":"https://api.github.com/users/PowerShell/orgs","repos_url":"https://api.github.com/users/PowerShell/repos","events_url":"https://api.github.com/users/PowerShell/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShell/received_events","type":"Organization","site_admin":false},"repo":{"id":49609581,"name":"PowerShell","full_name":"PowerShell/PowerShell","owner":{"login":"PowerShell","id":11524380,"avatar_url":"https://avatars.githubusercontent.com/u/11524380?v=3","gravatar_id":"","url":"https://api.github.com/users/PowerShell","html_url":"https://github.com/PowerShell","followers_url":"https://api.github.com/users/PowerShell/followers","following_url":"https://api.github.com/users/PowerShell/following{/other_user}","gists_url":"https://api.github.com/users/PowerShell/gists{/gist_id}","starred_url":"https://api.github.com/users/PowerShell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PowerShell/subscriptions","organizations_url":"https://api.github.com/users/PowerShell/orgs","repos_url":"https://api.github.com/users/PowerShell/repos","events_url":"https://api.github.com/users/PowerShell/events{/privacy}","received_events_url":"https://api.github.com/users/PowerShell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PowerShell/PowerShell","description":"PowerShell for every system!","fork":false,"url":"https://api.github.com/repos/PowerShell/PowerShell","forks_url":"https://api.github.com/repos/PowerShell/PowerShell/forks","keys_url":"https://api.github.com/repos/PowerShell/PowerShell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PowerShell/PowerShell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PowerShell/PowerShell/teams","hooks_url":"https://api.github.com/repos/PowerShell/PowerShell/hooks","issue_events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/events{/number}","events_url":"https://api.github.com/repos/PowerShell/PowerShell/events","assignees_url":"https://api.github.com/repos/PowerShell/PowerShell/assignees{/user}","branches_url":"https://api.github.com/repos/PowerShell/PowerShell/branches{/branch}","tags_url":"https://api.github.com/repos/PowerShell/PowerShell/tags","blobs_url":"https://api.github.com/repos/PowerShell/PowerShell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PowerShell/PowerShell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PowerShell/PowerShell/git/refs{/sha}","trees_url":"https://api.github.com/repos/PowerShell/PowerShell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PowerShell/PowerShell/statuses/{sha}","languages_url":"https://api.github.com/repos/PowerShell/PowerShell/languages","stargazers_url":"https://api.github.com/repos/PowerShell/PowerShell/stargazers","contributors_url":"https://api.github.com/repos/PowerShell/PowerShell/contributors","subscribers_url":"https://api.github.com/repos/PowerShell/PowerShell/subscribers","subscription_url":"https://api.github.com/repos/PowerShell/PowerShell/subscription","commits_url":"https://api.github.com/repos/PowerShell/PowerShell/commits{/sha}","git_commits_url":"https://api.github.com/repos/PowerShell/PowerShell/git/commits{/sha}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/comments{/number}","issue_comment_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/comments{/number}","contents_url":"https://api.github.com/repos/PowerShell/PowerShell/contents/{+path}","compare_url":"https://api.github.com/repos/PowerShell/PowerShell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PowerShell/PowerShell/merges","archive_url":"https://api.github.com/repos/PowerShell/PowerShell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PowerShell/PowerShell/downloads","issues_url":"https://api.github.com/repos/PowerShell/PowerShell/issues{/number}","pulls_url":"https://api.github.com/repos/PowerShell/PowerShell/pulls{/number}","milestones_url":"https://api.github.com/repos/PowerShell/PowerShell/milestones{/number}","notifications_url":"https://api.github.com/repos/PowerShell/PowerShell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/labels{/name}","releases_url":"https://api.github.com/repos/PowerShell/PowerShell/releases{/id}","deployments_url":"https://api.github.com/repos/PowerShell/PowerShell/deployments","created_at":"2016-01-13T23:41:35Z","updated_at":"2016-12-14T11:42:37Z","pushed_at":"2016-12-14T05:38:32Z","git_url":"git://github.com/PowerShell/PowerShell.git","ssh_url":"git@github.com:PowerShell/PowerShell.git","clone_url":"https://github.com/PowerShell/PowerShell.git","svn_url":"https://github.com/PowerShell/PowerShell","homepage":"https://microsoft.com/powershell","size":22824,"stargazers_count":5752,"watchers_count":5752,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":683,"mirror_url":null,"open_issues_count":524,"forks":683,"open_issues":524,"watchers":5752,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2862"},"html":{"href":"https://github.com/PowerShell/PowerShell/pull/2862"},"issue":{"href":"https://api.github.com/repos/PowerShell/PowerShell/issues/2862"},"comments":{"href":"https://api.github.com/repos/PowerShell/PowerShell/issues/2862/comments"},"review_comments":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2862/comments"},"review_comment":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PowerShell/PowerShell/pulls/2862/commits"},"statuses":{"href":"https://api.github.com/repos/PowerShell/PowerShell/statuses/52ad2d7d646ad18180740dc1b877d885d0570aee"}}}}
{"actor":{"display_login":"iSazonov"}}