{"action":"closed","number":49,"pull_request":{"url":"https://api.github.com/repos/drewm/mailchimp-api/pulls/49","id":41130429,"html_url":"https://github.com/drewm/mailchimp-api/pull/49","diff_url":"https://github.com/drewm/mailchimp-api/pull/49.diff","patch_url":"https://github.com/drewm/mailchimp-api/pull/49.patch","issue_url":"https://api.github.com/repos/drewm/mailchimp-api/issues/49","number":49,"state":"closed","locked":false,"title":"Add support for JSON object","user":{"login":"rolandkal","id":5774580,"avatar_url":"https://avatars.githubusercontent.com/u/5774580?v=3","gravatar_id":"","url":"https://api.github.com/users/rolandkal","html_url":"https://github.com/rolandkal","followers_url":"https://api.github.com/users/rolandkal/followers","following_url":"https://api.github.com/users/rolandkal/following{/other_user}","gists_url":"https://api.github.com/users/rolandkal/gists{/gist_id}","starred_url":"https://api.github.com/users/rolandkal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolandkal/subscriptions","organizations_url":"https://api.github.com/users/rolandkal/orgs","repos_url":"https://api.github.com/users/rolandkal/repos","events_url":"https://api.github.com/users/rolandkal/events{/privacy}","received_events_url":"https://api.github.com/users/rolandkal/received_events","type":"User","site_admin":false},"body":"I was unable to add the subscribers to interest groups with this api wrapper because `json_encode` converts all array to JSON array even if MailChimp expects an object. Adding this option to the function will help outputting an object rather than an array when a non-associative array is used.\r\nhttp://php.net/manual/en/function.json-encode.php\r\nhttp://php.net/manual/en/json.constants.php\r\n\r\n**Example:**\r\n\r\n```\r\n$MailChimp->post('lists/12a34b56c/members', array(\r\n        'email_address'     => 'peter@example.com',\r\n        'status'            => 'subscribed',\r\n        'merge_fields'      => array( 'FNAME'  => 'Peter'),\r\n        'interests' \t\t=> array( '56a7896c' => true )\r\n)\r\n```\r\n","created_at":"2015-07-29T14:38:03Z","updated_at":"2015-07-29T15:10:48Z","closed_at":"2015-07-29T15:10:48Z","merged_at":"2015-07-29T15:10:48Z","merge_commit_sha":"3f2d52f46b5e37709f45b65b86e7d4bee030b3dd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/drewm/mailchimp-api/pulls/49/commits","review_comments_url":"https://api.github.com/repos/drewm/mailchimp-api/pulls/49/comments","review_comment_url":"https://api.github.com/repos/drewm/mailchimp-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/drewm/mailchimp-api/issues/49/comments","statuses_url":"https://api.github.com/repos/drewm/mailchimp-api/statuses/e31d97808afc523b83fe22145b4e1debb8277cb5","head":{"label":"rolandkal:api-v3","ref":"api-v3","sha":"e31d97808afc523b83fe22145b4e1debb8277cb5","user":{"login":"rolandkal","id":5774580,"avatar_url":"https://avatars.githubusercontent.com/u/5774580?v=3","gravatar_id":"","url":"https://api.github.com/users/rolandkal","html_url":"https://github.com/rolandkal","followers_url":"https://api.github.com/users/rolandkal/followers","following_url":"https://api.github.com/users/rolandkal/following{/other_user}","gists_url":"https://api.github.com/users/rolandkal/gists{/gist_id}","starred_url":"https://api.github.com/users/rolandkal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolandkal/subscriptions","organizations_url":"https://api.github.com/users/rolandkal/orgs","repos_url":"https://api.github.com/users/rolandkal/repos","events_url":"https://api.github.com/users/rolandkal/events{/privacy}","received_events_url":"https://api.github.com/users/rolandkal/received_events","type":"User","site_admin":false},"repo":{"id":39897700,"name":"mailchimp-api","full_name":"rolandkal/mailchimp-api","owner":{"login":"rolandkal","id":5774580,"avatar_url":"https://avatars.githubusercontent.com/u/5774580?v=3","gravatar_id":"","url":"https://api.github.com/users/rolandkal","html_url":"https://github.com/rolandkal","followers_url":"https://api.github.com/users/rolandkal/followers","following_url":"https://api.github.com/users/rolandkal/following{/other_user}","gists_url":"https://api.github.com/users/rolandkal/gists{/gist_id}","starred_url":"https://api.github.com/users/rolandkal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolandkal/subscriptions","organizations_url":"https://api.github.com/users/rolandkal/orgs","repos_url":"https://api.github.com/users/rolandkal/repos","events_url":"https://api.github.com/users/rolandkal/events{/privacy}","received_events_url":"https://api.github.com/users/rolandkal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rolandkal/mailchimp-api","description":"Super-simple, minimum abstraction MailChimp API v2 / v3 wrapper, in PHP","fork":true,"url":"https://api.github.com/repos/rolandkal/mailchimp-api","forks_url":"https://api.github.com/repos/rolandkal/mailchimp-api/forks","keys_url":"https://api.github.com/repos/rolandkal/mailchimp-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rolandkal/mailchimp-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rolandkal/mailchimp-api/teams","hooks_url":"https://api.github.com/repos/rolandkal/mailchimp-api/hooks","issue_events_url":"https://api.github.com/repos/rolandkal/mailchimp-api/issues/events{/number}","events_url":"https://api.github.com/repos/rolandkal/mailchimp-api/events","assignees_url":"https://api.github.com/repos/rolandkal/mailchimp-api/assignees{/user}","branches_url":"https://api.github.com/repos/rolandkal/mailchimp-api/branches{/branch}","tags_url":"https://api.github.com/repos/rolandkal/mailchimp-api/tags","blobs_url":"https://api.github.com/repos/rolandkal/mailchimp-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rolandkal/mailchimp-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rolandkal/mailchimp-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/rolandkal/mailchimp-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rolandkal/mailchimp-api/statuses/{sha}","languages_url":"https://api.github.com/repos/rolandkal/mailchimp-api/languages","stargazers_url":"https://api.github.com/repos/rolandkal/mailchimp-api/stargazers","contributors_url":"https://api.github.com/repos/rolandkal/mailchimp-api/contributors","subscribers_url":"https://api.github.com/repos/rolandkal/mailchimp-api/subscribers","subscription_url":"https://api.github.com/repos/rolandkal/mailchimp-api/subscription","commits_url":"https://api.github.com/repos/rolandkal/mailchimp-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/rolandkal/mailchimp-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/rolandkal/mailchimp-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/rolandkal/mailchimp-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/rolandkal/mailchimp-api/contents/{+path}","compare_url":"https://api.github.com/repos/rolandkal/mailchimp-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rolandkal/mailchimp-api/merges","archive_url":"https://api.github.com/repos/rolandkal/mailchimp-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rolandkal/mailchimp-api/downloads","issues_url":"https://api.github.com/repos/rolandkal/mailchimp-api/issues{/number}","pulls_url":"https://api.github.com/repos/rolandkal/mailchimp-api/pulls{/number}","milestones_url":"https://api.github.com/repos/rolandkal/mailchimp-api/milestones{/number}","notifications_url":"https://api.github.com/repos/rolandkal/mailchimp-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rolandkal/mailchimp-api/labels{/name}","releases_url":"https://api.github.com/repos/rolandkal/mailchimp-api/releases{/id}","created_at":"2015-07-29T14:23:41Z","updated_at":"2015-07-29T14:23:42Z","pushed_at":"2015-07-29T14:32:36Z","git_url":"git://github.com/rolandkal/mailchimp-api.git","ssh_url":"git@github.com:rolandkal/mailchimp-api.git","clone_url":"https://github.com/rolandkal/mailchimp-api.git","svn_url":"https://github.com/rolandkal/mailchimp-api","homepage":"","size":761,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"drewm:api-v3","ref":"api-v3","sha":"2f7674952b899e3358231f7ecd0b37349d8de8c7","user":{"login":"drewm","id":225402,"avatar_url":"https://avatars.githubusercontent.com/u/225402?v=3","gravatar_id":"","url":"https://api.github.com/users/drewm","html_url":"https://github.com/drewm","followers_url":"https://api.github.com/users/drewm/followers","following_url":"https://api.github.com/users/drewm/following{/other_user}","gists_url":"https://api.github.com/users/drewm/gists{/gist_id}","starred_url":"https://api.github.com/users/drewm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewm/subscriptions","organizations_url":"https://api.github.com/users/drewm/orgs","repos_url":"https://api.github.com/users/drewm/repos","events_url":"https://api.github.com/users/drewm/events{/privacy}","received_events_url":"https://api.github.com/users/drewm/received_events","type":"User","site_admin":false},"repo":{"id":11761227,"name":"mailchimp-api","full_name":"drewm/mailchimp-api","owner":{"login":"drewm","id":225402,"avatar_url":"https://avatars.githubusercontent.com/u/225402?v=3","gravatar_id":"","url":"https://api.github.com/users/drewm","html_url":"https://github.com/drewm","followers_url":"https://api.github.com/users/drewm/followers","following_url":"https://api.github.com/users/drewm/following{/other_user}","gists_url":"https://api.github.com/users/drewm/gists{/gist_id}","starred_url":"https://api.github.com/users/drewm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewm/subscriptions","organizations_url":"https://api.github.com/users/drewm/orgs","repos_url":"https://api.github.com/users/drewm/repos","events_url":"https://api.github.com/users/drewm/events{/privacy}","received_events_url":"https://api.github.com/users/drewm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drewm/mailchimp-api","description":"Super-simple, minimum abstraction MailChimp API v2 / v3 wrapper, in PHP","fork":false,"url":"https://api.github.com/repos/drewm/mailchimp-api","forks_url":"https://api.github.com/repos/drewm/mailchimp-api/forks","keys_url":"https://api.github.com/repos/drewm/mailchimp-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drewm/mailchimp-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drewm/mailchimp-api/teams","hooks_url":"https://api.github.com/repos/drewm/mailchimp-api/hooks","issue_events_url":"https://api.github.com/repos/drewm/mailchimp-api/issues/events{/number}","events_url":"https://api.github.com/repos/drewm/mailchimp-api/events","assignees_url":"https://api.github.com/repos/drewm/mailchimp-api/assignees{/user}","branches_url":"https://api.github.com/repos/drewm/mailchimp-api/branches{/branch}","tags_url":"https://api.github.com/repos/drewm/mailchimp-api/tags","blobs_url":"https://api.github.com/repos/drewm/mailchimp-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drewm/mailchimp-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drewm/mailchimp-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/drewm/mailchimp-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drewm/mailchimp-api/statuses/{sha}","languages_url":"https://api.github.com/repos/drewm/mailchimp-api/languages","stargazers_url":"https://api.github.com/repos/drewm/mailchimp-api/stargazers","contributors_url":"https://api.github.com/repos/drewm/mailchimp-api/contributors","subscribers_url":"https://api.github.com/repos/drewm/mailchimp-api/subscribers","subscription_url":"https://api.github.com/repos/drewm/mailchimp-api/subscription","commits_url":"https://api.github.com/repos/drewm/mailchimp-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/drewm/mailchimp-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/drewm/mailchimp-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/drewm/mailchimp-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/drewm/mailchimp-api/contents/{+path}","compare_url":"https://api.github.com/repos/drewm/mailchimp-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drewm/mailchimp-api/merges","archive_url":"https://api.github.com/repos/drewm/mailchimp-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drewm/mailchimp-api/downloads","issues_url":"https://api.github.com/repos/drewm/mailchimp-api/issues{/number}","pulls_url":"https://api.github.com/repos/drewm/mailchimp-api/pulls{/number}","milestones_url":"https://api.github.com/repos/drewm/mailchimp-api/milestones{/number}","notifications_url":"https://api.github.com/repos/drewm/mailchimp-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drewm/mailchimp-api/labels{/name}","releases_url":"https://api.github.com/repos/drewm/mailchimp-api/releases{/id}","created_at":"2013-07-30T09:16:36Z","updated_at":"2015-07-29T14:54:20Z","pushed_at":"2015-07-29T15:10:47Z","git_url":"git://github.com/drewm/mailchimp-api.git","ssh_url":"git@github.com:drewm/mailchimp-api.git","clone_url":"https://github.com/drewm/mailchimp-api.git","svn_url":"https://github.com/drewm/mailchimp-api","homepage":"","size":761,"stargazers_count":420,"watchers_count":420,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":159,"mirror_url":null,"open_issues_count":4,"forks":159,"open_issues":4,"watchers":420,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/drewm/mailchimp-api/pulls/49"},"html":{"href":"https://github.com/drewm/mailchimp-api/pull/49"},"issue":{"href":"https://api.github.com/repos/drewm/mailchimp-api/issues/49"},"comments":{"href":"https://api.github.com/repos/drewm/mailchimp-api/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/drewm/mailchimp-api/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/drewm/mailchimp-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/drewm/mailchimp-api/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/drewm/mailchimp-api/statuses/e31d97808afc523b83fe22145b4e1debb8277cb5"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"drewm","id":225402,"avatar_url":"https://avatars.githubusercontent.com/u/225402?v=3","gravatar_id":"","url":"https://api.github.com/users/drewm","html_url":"https://github.com/drewm","followers_url":"https://api.github.com/users/drewm/followers","following_url":"https://api.github.com/users/drewm/following{/other_user}","gists_url":"https://api.github.com/users/drewm/gists{/gist_id}","starred_url":"https://api.github.com/users/drewm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewm/subscriptions","organizations_url":"https://api.github.com/users/drewm/orgs","repos_url":"https://api.github.com/users/drewm/repos","events_url":"https://api.github.com/users/drewm/events{/privacy}","received_events_url":"https://api.github.com/users/drewm/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":2,"additions":5,"deletions":4,"changed_files":2}}