{"action":"opened","number":28,"pull_request":{"url":"https://api.github.com/repos/agourlay/cornichon/pulls/28","id":54960255,"html_url":"https://github.com/agourlay/cornichon/pull/28","diff_url":"https://github.com/agourlay/cornichon/pull/28.diff","patch_url":"https://github.com/agourlay/cornichon/pull/28.patch","issue_url":"https://api.github.com/repos/agourlay/cornichon/issues/28","number":28,"state":"open","locked":false,"title":"Json path","user":{"login":"agourlay","id":606963,"avatar_url":"https://avatars.githubusercontent.com/u/606963?v=3","gravatar_id":"","url":"https://api.github.com/users/agourlay","html_url":"https://github.com/agourlay","followers_url":"https://api.github.com/users/agourlay/followers","following_url":"https://api.github.com/users/agourlay/following{/other_user}","gists_url":"https://api.github.com/users/agourlay/gists{/gist_id}","starred_url":"https://api.github.com/users/agourlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agourlay/subscriptions","organizations_url":"https://api.github.com/users/agourlay/orgs","repos_url":"https://api.github.com/users/agourlay/repos","events_url":"https://api.github.com/users/agourlay/events{/privacy}","received_events_url":"https://api.github.com/users/agourlay/received_events","type":"User","site_admin":false},"body":"This is an experiment to introduce a ```JSON path like``` syntax for extractors to target https://github.com/agourlay/cornichon/issues/23\r\n\r\nHere is a quick comparison:\r\n\r\n```body_is(_ \\ \"publisher\" \\ \"foundationYear\", 1934)```\r\n```body_field_is(\"publisher.foundationYear\", 1934) ```\r\n\r\n```body_is( b => (b \\ \"Episodes\")(0), jsonString) ``` \r\n```body_field_is(\"Episodes[0]\", jsonString) ```\r\n\r\n```body_is( b => (b \\ \"Episodes\")(0) \\ \"Released\" , jsonString) ```\r\n```body_field_is(\"Episodes[0].Released\", jsonString) ```\r\n\r\nPros:\r\n- extraction path can be displayed properly in the step description\r\n- easier to use\r\n- easier to read in the case of array extraction\r\n- Json4s does not leak through the DSL\r\n\r\nCons:\r\n- operation not typed checked anymore\r\n- forced to introduce another method ```body_field_is``` as overloading is not possible anymore because all args are Strings now.","created_at":"2016-01-04T10:17:38Z","updated_at":"2016-01-04T10:17:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/agourlay/cornichon/pulls/28/commits","review_comments_url":"https://api.github.com/repos/agourlay/cornichon/pulls/28/comments","review_comment_url":"https://api.github.com/repos/agourlay/cornichon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/agourlay/cornichon/issues/28/comments","statuses_url":"https://api.github.com/repos/agourlay/cornichon/statuses/4663cff9642519635de7df5572bbf640b4b62de0","head":{"label":"agourlay:json-path","ref":"json-path","sha":"4663cff9642519635de7df5572bbf640b4b62de0","user":{"login":"agourlay","id":606963,"avatar_url":"https://avatars.githubusercontent.com/u/606963?v=3","gravatar_id":"","url":"https://api.github.com/users/agourlay","html_url":"https://github.com/agourlay","followers_url":"https://api.github.com/users/agourlay/followers","following_url":"https://api.github.com/users/agourlay/following{/other_user}","gists_url":"https://api.github.com/users/agourlay/gists{/gist_id}","starred_url":"https://api.github.com/users/agourlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agourlay/subscriptions","organizations_url":"https://api.github.com/users/agourlay/orgs","repos_url":"https://api.github.com/users/agourlay/repos","events_url":"https://api.github.com/users/agourlay/events{/privacy}","received_events_url":"https://api.github.com/users/agourlay/received_events","type":"User","site_admin":false},"repo":{"id":39765500,"name":"cornichon","full_name":"agourlay/cornichon","owner":{"login":"agourlay","id":606963,"avatar_url":"https://avatars.githubusercontent.com/u/606963?v=3","gravatar_id":"","url":"https://api.github.com/users/agourlay","html_url":"https://github.com/agourlay","followers_url":"https://api.github.com/users/agourlay/followers","following_url":"https://api.github.com/users/agourlay/following{/other_user}","gists_url":"https://api.github.com/users/agourlay/gists{/gist_id}","starred_url":"https://api.github.com/users/agourlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agourlay/subscriptions","organizations_url":"https://api.github.com/users/agourlay/orgs","repos_url":"https://api.github.com/users/agourlay/repos","events_url":"https://api.github.com/users/agourlay/events{/privacy}","received_events_url":"https://api.github.com/users/agourlay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/agourlay/cornichon","description":"Scala DSL for testing HTTP JSON API","fork":false,"url":"https://api.github.com/repos/agourlay/cornichon","forks_url":"https://api.github.com/repos/agourlay/cornichon/forks","keys_url":"https://api.github.com/repos/agourlay/cornichon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/agourlay/cornichon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/agourlay/cornichon/teams","hooks_url":"https://api.github.com/repos/agourlay/cornichon/hooks","issue_events_url":"https://api.github.com/repos/agourlay/cornichon/issues/events{/number}","events_url":"https://api.github.com/repos/agourlay/cornichon/events","assignees_url":"https://api.github.com/repos/agourlay/cornichon/assignees{/user}","branches_url":"https://api.github.com/repos/agourlay/cornichon/branches{/branch}","tags_url":"https://api.github.com/repos/agourlay/cornichon/tags","blobs_url":"https://api.github.com/repos/agourlay/cornichon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/agourlay/cornichon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/agourlay/cornichon/git/refs{/sha}","trees_url":"https://api.github.com/repos/agourlay/cornichon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/agourlay/cornichon/statuses/{sha}","languages_url":"https://api.github.com/repos/agourlay/cornichon/languages","stargazers_url":"https://api.github.com/repos/agourlay/cornichon/stargazers","contributors_url":"https://api.github.com/repos/agourlay/cornichon/contributors","subscribers_url":"https://api.github.com/repos/agourlay/cornichon/subscribers","subscription_url":"https://api.github.com/repos/agourlay/cornichon/subscription","commits_url":"https://api.github.com/repos/agourlay/cornichon/commits{/sha}","git_commits_url":"https://api.github.com/repos/agourlay/cornichon/git/commits{/sha}","comments_url":"https://api.github.com/repos/agourlay/cornichon/comments{/number}","issue_comment_url":"https://api.github.com/repos/agourlay/cornichon/issues/comments{/number}","contents_url":"https://api.github.com/repos/agourlay/cornichon/contents/{+path}","compare_url":"https://api.github.com/repos/agourlay/cornichon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/agourlay/cornichon/merges","archive_url":"https://api.github.com/repos/agourlay/cornichon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/agourlay/cornichon/downloads","issues_url":"https://api.github.com/repos/agourlay/cornichon/issues{/number}","pulls_url":"https://api.github.com/repos/agourlay/cornichon/pulls{/number}","milestones_url":"https://api.github.com/repos/agourlay/cornichon/milestones{/number}","notifications_url":"https://api.github.com/repos/agourlay/cornichon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/agourlay/cornichon/labels{/name}","releases_url":"https://api.github.com/repos/agourlay/cornichon/releases{/id}","created_at":"2015-07-27T09:14:49Z","updated_at":"2015-11-27T13:11:18Z","pushed_at":"2016-01-04T09:51:07Z","git_url":"git://github.com/agourlay/cornichon.git","ssh_url":"git@github.com:agourlay/cornichon.git","clone_url":"https://github.com/agourlay/cornichon.git","svn_url":"https://github.com/agourlay/cornichon","homepage":"","size":472,"stargazers_count":40,"watchers_count":40,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":17,"forks":2,"open_issues":17,"watchers":40,"default_branch":"master"}},"base":{"label":"agourlay:0.4.0","ref":"0.4.0","sha":"b583c9bc376040e337ffd7c26fa6a96ff7dca4bc","user":{"login":"agourlay","id":606963,"avatar_url":"https://avatars.githubusercontent.com/u/606963?v=3","gravatar_id":"","url":"https://api.github.com/users/agourlay","html_url":"https://github.com/agourlay","followers_url":"https://api.github.com/users/agourlay/followers","following_url":"https://api.github.com/users/agourlay/following{/other_user}","gists_url":"https://api.github.com/users/agourlay/gists{/gist_id}","starred_url":"https://api.github.com/users/agourlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agourlay/subscriptions","organizations_url":"https://api.github.com/users/agourlay/orgs","repos_url":"https://api.github.com/users/agourlay/repos","events_url":"https://api.github.com/users/agourlay/events{/privacy}","received_events_url":"https://api.github.com/users/agourlay/received_events","type":"User","site_admin":false},"repo":{"id":39765500,"name":"cornichon","full_name":"agourlay/cornichon","owner":{"login":"agourlay","id":606963,"avatar_url":"https://avatars.githubusercontent.com/u/606963?v=3","gravatar_id":"","url":"https://api.github.com/users/agourlay","html_url":"https://github.com/agourlay","followers_url":"https://api.github.com/users/agourlay/followers","following_url":"https://api.github.com/users/agourlay/following{/other_user}","gists_url":"https://api.github.com/users/agourlay/gists{/gist_id}","starred_url":"https://api.github.com/users/agourlay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agourlay/subscriptions","organizations_url":"https://api.github.com/users/agourlay/orgs","repos_url":"https://api.github.com/users/agourlay/repos","events_url":"https://api.github.com/users/agourlay/events{/privacy}","received_events_url":"https://api.github.com/users/agourlay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/agourlay/cornichon","description":"Scala DSL for testing HTTP JSON API","fork":false,"url":"https://api.github.com/repos/agourlay/cornichon","forks_url":"https://api.github.com/repos/agourlay/cornichon/forks","keys_url":"https://api.github.com/repos/agourlay/cornichon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/agourlay/cornichon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/agourlay/cornichon/teams","hooks_url":"https://api.github.com/repos/agourlay/cornichon/hooks","issue_events_url":"https://api.github.com/repos/agourlay/cornichon/issues/events{/number}","events_url":"https://api.github.com/repos/agourlay/cornichon/events","assignees_url":"https://api.github.com/repos/agourlay/cornichon/assignees{/user}","branches_url":"https://api.github.com/repos/agourlay/cornichon/branches{/branch}","tags_url":"https://api.github.com/repos/agourlay/cornichon/tags","blobs_url":"https://api.github.com/repos/agourlay/cornichon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/agourlay/cornichon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/agourlay/cornichon/git/refs{/sha}","trees_url":"https://api.github.com/repos/agourlay/cornichon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/agourlay/cornichon/statuses/{sha}","languages_url":"https://api.github.com/repos/agourlay/cornichon/languages","stargazers_url":"https://api.github.com/repos/agourlay/cornichon/stargazers","contributors_url":"https://api.github.com/repos/agourlay/cornichon/contributors","subscribers_url":"https://api.github.com/repos/agourlay/cornichon/subscribers","subscription_url":"https://api.github.com/repos/agourlay/cornichon/subscription","commits_url":"https://api.github.com/repos/agourlay/cornichon/commits{/sha}","git_commits_url":"https://api.github.com/repos/agourlay/cornichon/git/commits{/sha}","comments_url":"https://api.github.com/repos/agourlay/cornichon/comments{/number}","issue_comment_url":"https://api.github.com/repos/agourlay/cornichon/issues/comments{/number}","contents_url":"https://api.github.com/repos/agourlay/cornichon/contents/{+path}","compare_url":"https://api.github.com/repos/agourlay/cornichon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/agourlay/cornichon/merges","archive_url":"https://api.github.com/repos/agourlay/cornichon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/agourlay/cornichon/downloads","issues_url":"https://api.github.com/repos/agourlay/cornichon/issues{/number}","pulls_url":"https://api.github.com/repos/agourlay/cornichon/pulls{/number}","milestones_url":"https://api.github.com/repos/agourlay/cornichon/milestones{/number}","notifications_url":"https://api.github.com/repos/agourlay/cornichon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/agourlay/cornichon/labels{/name}","releases_url":"https://api.github.com/repos/agourlay/cornichon/releases{/id}","created_at":"2015-07-27T09:14:49Z","updated_at":"2015-11-27T13:11:18Z","pushed_at":"2016-01-04T09:51:07Z","git_url":"git://github.com/agourlay/cornichon.git","ssh_url":"git@github.com:agourlay/cornichon.git","clone_url":"https://github.com/agourlay/cornichon.git","svn_url":"https://github.com/agourlay/cornichon","homepage":"","size":472,"stargazers_count":40,"watchers_count":40,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":17,"forks":2,"open_issues":17,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/agourlay/cornichon/pulls/28"},"html":{"href":"https://github.com/agourlay/cornichon/pull/28"},"issue":{"href":"https://api.github.com/repos/agourlay/cornichon/issues/28"},"comments":{"href":"https://api.github.com/repos/agourlay/cornichon/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/agourlay/cornichon/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/agourlay/cornichon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/agourlay/cornichon/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/agourlay/cornichon/statuses/4663cff9642519635de7df5572bbf640b4b62de0"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":208,"deletions":121,"changed_files":10}}