{"action":"created","comment":{"url":"https://api.github.com/repos/mrak/stubby4node/pulls/comments/56678438","id":56678438,"diff_hunk":"@@ -245,6 +245,24 @@ postedData.json\n \n * if `postedData.json` doesn't exist on the filesystem when `/match/against/file` is requested, stubby will match post contents against `{\"fallback\":\"data\"}` (from `post`) instead.\n \n+#### json\n+\n+* not used if `post` or `file` are present.\n+* will be parsed into a JavaScript object.\n+* allows you to specify a JSON string that will be deeply compared with a JSON request\n+\n+Although not required, it is recommended to also specify a `application/json` header requirement.\n+\n+```yaml\n+-  request:\n+      url: ^/match/against/jsonString$\n+      headers:\n+         content-type: application/json\n+      json: '{\"key1\":\"value1\",\"key2\":\"value2\"}'","path":"README.md","position":17,"original_position":17,"commit_id":"0784682a730e30c3c8bb7382771907c68690e1b5","original_commit_id":"0784682a730e30c3c8bb7382771907c68690e1b5","user":{"login":"mrak","id":491140,"avatar_url":"https://avatars.githubusercontent.com/u/491140?v=3","gravatar_id":"","url":"https://api.github.com/users/mrak","html_url":"https://github.com/mrak","followers_url":"https://api.github.com/users/mrak/followers","following_url":"https://api.github.com/users/mrak/following{/other_user}","gists_url":"https://api.github.com/users/mrak/gists{/gist_id}","starred_url":"https://api.github.com/users/mrak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrak/subscriptions","organizations_url":"https://api.github.com/users/mrak/orgs","repos_url":"https://api.github.com/users/mrak/repos","events_url":"https://api.github.com/users/mrak/events{/privacy}","received_events_url":"https://api.github.com/users/mrak/received_events","type":"User","site_admin":false},"body":"Since YAML is a superset of JSON, perhaps the `json:` values could be actual objects instead of strings? This would keep us from having to `JSON.parse` on every request","created_at":"2016-03-18T15:57:29Z","updated_at":"2016-03-18T15:57:29Z","html_url":"https://github.com/mrak/stubby4node/pull/54#discussion_r56678438","pull_request_url":"https://api.github.com/repos/mrak/stubby4node/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/mrak/stubby4node/pulls/comments/56678438"},"html":{"href":"https://github.com/mrak/stubby4node/pull/54#discussion_r56678438"},"pull_request":{"href":"https://api.github.com/repos/mrak/stubby4node/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/mrak/stubby4node/pulls/54","id":63390938,"html_url":"https://github.com/mrak/stubby4node/pull/54","diff_url":"https://github.com/mrak/stubby4node/pull/54.diff","patch_url":"https://github.com/mrak/stubby4node/pull/54.patch","issue_url":"https://api.github.com/repos/mrak/stubby4node/issues/54","number":54,"state":"open","locked":false,"title":"Add JSON comprehension","user":{"login":"jj4th","id":1107895,"avatar_url":"https://avatars.githubusercontent.com/u/1107895?v=3","gravatar_id":"","url":"https://api.github.com/users/jj4th","html_url":"https://github.com/jj4th","followers_url":"https://api.github.com/users/jj4th/followers","following_url":"https://api.github.com/users/jj4th/following{/other_user}","gists_url":"https://api.github.com/users/jj4th/gists{/gist_id}","starred_url":"https://api.github.com/users/jj4th/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jj4th/subscriptions","organizations_url":"https://api.github.com/users/jj4th/orgs","repos_url":"https://api.github.com/users/jj4th/repos","events_url":"https://api.github.com/users/jj4th/events{/privacy}","received_events_url":"https://api.github.com/users/jj4th/received_events","type":"User","site_admin":false},"body":"closes #53 ","created_at":"2016-03-18T15:25:41Z","updated_at":"2016-03-18T15:57:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e402f4d5120f55c05f18cb553fd94ea1ea1e0d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mrak/stubby4node/pulls/54/commits","review_comments_url":"https://api.github.com/repos/mrak/stubby4node/pulls/54/comments","review_comment_url":"https://api.github.com/repos/mrak/stubby4node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mrak/stubby4node/issues/54/comments","statuses_url":"https://api.github.com/repos/mrak/stubby4node/statuses/0784682a730e30c3c8bb7382771907c68690e1b5","head":{"label":"jj4th:add-json-comprehension","ref":"add-json-comprehension","sha":"0784682a730e30c3c8bb7382771907c68690e1b5","user":{"login":"jj4th","id":1107895,"avatar_url":"https://avatars.githubusercontent.com/u/1107895?v=3","gravatar_id":"","url":"https://api.github.com/users/jj4th","html_url":"https://github.com/jj4th","followers_url":"https://api.github.com/users/jj4th/followers","following_url":"https://api.github.com/users/jj4th/following{/other_user}","gists_url":"https://api.github.com/users/jj4th/gists{/gist_id}","starred_url":"https://api.github.com/users/jj4th/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jj4th/subscriptions","organizations_url":"https://api.github.com/users/jj4th/orgs","repos_url":"https://api.github.com/users/jj4th/repos","events_url":"https://api.github.com/users/jj4th/events{/privacy}","received_events_url":"https://api.github.com/users/jj4th/received_events","type":"User","site_admin":false},"repo":{"id":54058824,"name":"stubby4node","full_name":"jj4th/stubby4node","owner":{"login":"jj4th","id":1107895,"avatar_url":"https://avatars.githubusercontent.com/u/1107895?v=3","gravatar_id":"","url":"https://api.github.com/users/jj4th","html_url":"https://github.com/jj4th","followers_url":"https://api.github.com/users/jj4th/followers","following_url":"https://api.github.com/users/jj4th/following{/other_user}","gists_url":"https://api.github.com/users/jj4th/gists{/gist_id}","starred_url":"https://api.github.com/users/jj4th/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jj4th/subscriptions","organizations_url":"https://api.github.com/users/jj4th/orgs","repos_url":"https://api.github.com/users/jj4th/repos","events_url":"https://api.github.com/users/jj4th/events{/privacy}","received_events_url":"https://api.github.com/users/jj4th/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jj4th/stubby4node","description":"A configurable server for mocking/stubbing external systems during development.","fork":true,"url":"https://api.github.com/repos/jj4th/stubby4node","forks_url":"https://api.github.com/repos/jj4th/stubby4node/forks","keys_url":"https://api.github.com/repos/jj4th/stubby4node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jj4th/stubby4node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jj4th/stubby4node/teams","hooks_url":"https://api.github.com/repos/jj4th/stubby4node/hooks","issue_events_url":"https://api.github.com/repos/jj4th/stubby4node/issues/events{/number}","events_url":"https://api.github.com/repos/jj4th/stubby4node/events","assignees_url":"https://api.github.com/repos/jj4th/stubby4node/assignees{/user}","branches_url":"https://api.github.com/repos/jj4th/stubby4node/branches{/branch}","tags_url":"https://api.github.com/repos/jj4th/stubby4node/tags","blobs_url":"https://api.github.com/repos/jj4th/stubby4node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jj4th/stubby4node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jj4th/stubby4node/git/refs{/sha}","trees_url":"https://api.github.com/repos/jj4th/stubby4node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jj4th/stubby4node/statuses/{sha}","languages_url":"https://api.github.com/repos/jj4th/stubby4node/languages","stargazers_url":"https://api.github.com/repos/jj4th/stubby4node/stargazers","contributors_url":"https://api.github.com/repos/jj4th/stubby4node/contributors","subscribers_url":"https://api.github.com/repos/jj4th/stubby4node/subscribers","subscription_url":"https://api.github.com/repos/jj4th/stubby4node/subscription","commits_url":"https://api.github.com/repos/jj4th/stubby4node/commits{/sha}","git_commits_url":"https://api.github.com/repos/jj4th/stubby4node/git/commits{/sha}","comments_url":"https://api.github.com/repos/jj4th/stubby4node/comments{/number}","issue_comment_url":"https://api.github.com/repos/jj4th/stubby4node/issues/comments{/number}","contents_url":"https://api.github.com/repos/jj4th/stubby4node/contents/{+path}","compare_url":"https://api.github.com/repos/jj4th/stubby4node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jj4th/stubby4node/merges","archive_url":"https://api.github.com/repos/jj4th/stubby4node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jj4th/stubby4node/downloads","issues_url":"https://api.github.com/repos/jj4th/stubby4node/issues{/number}","pulls_url":"https://api.github.com/repos/jj4th/stubby4node/pulls{/number}","milestones_url":"https://api.github.com/repos/jj4th/stubby4node/milestones{/number}","notifications_url":"https://api.github.com/repos/jj4th/stubby4node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jj4th/stubby4node/labels{/name}","releases_url":"https://api.github.com/repos/jj4th/stubby4node/releases{/id}","deployments_url":"https://api.github.com/repos/jj4th/stubby4node/deployments","created_at":"2016-03-16T19:00:01Z","updated_at":"2016-03-16T19:00:01Z","pushed_at":"2016-03-18T15:34:40Z","git_url":"git://github.com/jj4th/stubby4node.git","ssh_url":"git@github.com:jj4th/stubby4node.git","clone_url":"https://github.com/jj4th/stubby4node.git","svn_url":"https://github.com/jj4th/stubby4node","homepage":"","size":989,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"mrak:master","ref":"master","sha":"184ed05ef70ff71d0eb0b95555f82c43ae94f51a","user":{"login":"mrak","id":491140,"avatar_url":"https://avatars.githubusercontent.com/u/491140?v=3","gravatar_id":"","url":"https://api.github.com/users/mrak","html_url":"https://github.com/mrak","followers_url":"https://api.github.com/users/mrak/followers","following_url":"https://api.github.com/users/mrak/following{/other_user}","gists_url":"https://api.github.com/users/mrak/gists{/gist_id}","starred_url":"https://api.github.com/users/mrak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrak/subscriptions","organizations_url":"https://api.github.com/users/mrak/orgs","repos_url":"https://api.github.com/users/mrak/repos","events_url":"https://api.github.com/users/mrak/events{/privacy}","received_events_url":"https://api.github.com/users/mrak/received_events","type":"User","site_admin":false},"repo":{"id":4375798,"name":"stubby4node","full_name":"mrak/stubby4node","owner":{"login":"mrak","id":491140,"avatar_url":"https://avatars.githubusercontent.com/u/491140?v=3","gravatar_id":"","url":"https://api.github.com/users/mrak","html_url":"https://github.com/mrak","followers_url":"https://api.github.com/users/mrak/followers","following_url":"https://api.github.com/users/mrak/following{/other_user}","gists_url":"https://api.github.com/users/mrak/gists{/gist_id}","starred_url":"https://api.github.com/users/mrak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrak/subscriptions","organizations_url":"https://api.github.com/users/mrak/orgs","repos_url":"https://api.github.com/users/mrak/repos","events_url":"https://api.github.com/users/mrak/events{/privacy}","received_events_url":"https://api.github.com/users/mrak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrak/stubby4node","description":"A configurable server for mocking/stubbing external systems during development.","fork":false,"url":"https://api.github.com/repos/mrak/stubby4node","forks_url":"https://api.github.com/repos/mrak/stubby4node/forks","keys_url":"https://api.github.com/repos/mrak/stubby4node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrak/stubby4node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrak/stubby4node/teams","hooks_url":"https://api.github.com/repos/mrak/stubby4node/hooks","issue_events_url":"https://api.github.com/repos/mrak/stubby4node/issues/events{/number}","events_url":"https://api.github.com/repos/mrak/stubby4node/events","assignees_url":"https://api.github.com/repos/mrak/stubby4node/assignees{/user}","branches_url":"https://api.github.com/repos/mrak/stubby4node/branches{/branch}","tags_url":"https://api.github.com/repos/mrak/stubby4node/tags","blobs_url":"https://api.github.com/repos/mrak/stubby4node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrak/stubby4node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrak/stubby4node/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrak/stubby4node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrak/stubby4node/statuses/{sha}","languages_url":"https://api.github.com/repos/mrak/stubby4node/languages","stargazers_url":"https://api.github.com/repos/mrak/stubby4node/stargazers","contributors_url":"https://api.github.com/repos/mrak/stubby4node/contributors","subscribers_url":"https://api.github.com/repos/mrak/stubby4node/subscribers","subscription_url":"https://api.github.com/repos/mrak/stubby4node/subscription","commits_url":"https://api.github.com/repos/mrak/stubby4node/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrak/stubby4node/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrak/stubby4node/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrak/stubby4node/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrak/stubby4node/contents/{+path}","compare_url":"https://api.github.com/repos/mrak/stubby4node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrak/stubby4node/merges","archive_url":"https://api.github.com/repos/mrak/stubby4node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrak/stubby4node/downloads","issues_url":"https://api.github.com/repos/mrak/stubby4node/issues{/number}","pulls_url":"https://api.github.com/repos/mrak/stubby4node/pulls{/number}","milestones_url":"https://api.github.com/repos/mrak/stubby4node/milestones{/number}","notifications_url":"https://api.github.com/repos/mrak/stubby4node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrak/stubby4node/labels{/name}","releases_url":"https://api.github.com/repos/mrak/stubby4node/releases{/id}","deployments_url":"https://api.github.com/repos/mrak/stubby4node/deployments","created_at":"2012-05-19T05:15:14Z","updated_at":"2016-03-07T13:53:14Z","pushed_at":"2016-03-18T15:34:40Z","git_url":"git://github.com/mrak/stubby4node.git","ssh_url":"git@github.com:mrak/stubby4node.git","clone_url":"https://github.com/mrak/stubby4node.git","svn_url":"https://github.com/mrak/stubby4node","homepage":"","size":997,"stargazers_count":120,"watchers_count":120,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":34,"mirror_url":null,"open_issues_count":8,"forks":34,"open_issues":8,"watchers":120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mrak/stubby4node/pulls/54"},"html":{"href":"https://github.com/mrak/stubby4node/pull/54"},"issue":{"href":"https://api.github.com/repos/mrak/stubby4node/issues/54"},"comments":{"href":"https://api.github.com/repos/mrak/stubby4node/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/mrak/stubby4node/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/mrak/stubby4node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mrak/stubby4node/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/mrak/stubby4node/statuses/0784682a730e30c3c8bb7382771907c68690e1b5"}}}}