{"action":"created","comment":{"url":"https://api.github.com/repos/js-cookie/js-cookie/pulls/comments/28493477","id":28493477,"diff_hunk":"@@ -72,6 +72,28 @@ Cookies.remove('name', { path: '/' }); // => true\n \n *Note: when deleting a cookie, you must pass the exact same path, domain and secure options that were used to set the cookie, unless you're relying on the default options that is.*\n \n+## JSON\n+\n+js-cookie provides automatic JSON storage for cookies.\n+\n+When creating a cookie you can pass an Array or Object Literal instead of a string in the value. If you do so, js-cookie store the string representation of the object according to the `JSON.stringify` api (if available):","path":"README.md","position":25,"original_position":25,"commit_id":"9adc4da866b4be23b7c7093dc122401fd2b577de","original_commit_id":"9adc4da866b4be23b7c7093dc122401fd2b577de","user":{"login":"FagnerMartinsBrack","id":835857,"avatar_url":"https://avatars.githubusercontent.com/u/835857?v=3","gravatar_id":"","url":"https://api.github.com/users/FagnerMartinsBrack","html_url":"https://github.com/FagnerMartinsBrack","followers_url":"https://api.github.com/users/FagnerMartinsBrack/followers","following_url":"https://api.github.com/users/FagnerMartinsBrack/following{/other_user}","gists_url":"https://api.github.com/users/FagnerMartinsBrack/gists{/gist_id}","starred_url":"https://api.github.com/users/FagnerMartinsBrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FagnerMartinsBrack/subscriptions","organizations_url":"https://api.github.com/users/FagnerMartinsBrack/orgs","repos_url":"https://api.github.com/users/FagnerMartinsBrack/repos","events_url":"https://api.github.com/users/FagnerMartinsBrack/events{/privacy}","received_events_url":"https://api.github.com/users/FagnerMartinsBrack/received_events","type":"User","site_admin":false},"body":"We could document that if it's not a valid JSON structure then it will use `String(object)` in the input, but then we would be enforcing behavior for invalid input, and any changes that does something else would be backwards incompatible.\r\n\r\nAssuming we are using [semver spec](semver.org), backwards incompatible changes should only be  release in major version (in this case v3.0).","created_at":"2015-04-16T08:58:27Z","updated_at":"2015-04-16T08:58:27Z","html_url":"https://github.com/js-cookie/js-cookie/pull/10#discussion_r28493477","pull_request_url":"https://api.github.com/repos/js-cookie/js-cookie/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/js-cookie/js-cookie/pulls/comments/28493477"},"html":{"href":"https://github.com/js-cookie/js-cookie/pull/10#discussion_r28493477"},"pull_request":{"href":"https://api.github.com/repos/js-cookie/js-cookie/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/js-cookie/js-cookie/pulls/10","id":33132274,"html_url":"https://github.com/js-cookie/js-cookie/pull/10","diff_url":"https://github.com/js-cookie/js-cookie/pull/10.diff","patch_url":"https://github.com/js-cookie/js-cookie/pull/10.patch","issue_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/10","number":10,"state":"closed","locked":false,"title":"Add JSON automatic handling","user":{"login":"FagnerMartinsBrack","id":835857,"avatar_url":"https://avatars.githubusercontent.com/u/835857?v=3","gravatar_id":"","url":"https://api.github.com/users/FagnerMartinsBrack","html_url":"https://github.com/FagnerMartinsBrack","followers_url":"https://api.github.com/users/FagnerMartinsBrack/followers","following_url":"https://api.github.com/users/FagnerMartinsBrack/following{/other_user}","gists_url":"https://api.github.com/users/FagnerMartinsBrack/gists{/gist_id}","starred_url":"https://api.github.com/users/FagnerMartinsBrack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FagnerMartinsBrack/subscriptions","organizations_url":"https://api.github.com/users/FagnerMartinsBrack/orgs","repos_url":"https://api.github.com/users/FagnerMartinsBrack/repos","events_url":"https://api.github.com/users/FagnerMartinsBrack/events{/privacy}","received_events_url":"https://api.github.com/users/FagnerMartinsBrack/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-13T02:35:31Z","updated_at":"2015-04-16T08:58:27Z","closed_at":"2015-04-15T16:48:27Z","merged_at":"2015-04-15T16:48:27Z","merge_commit_sha":"5d8e65de5a15b899c9e938c2cd28c66c8bad7594","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/js-cookie/js-cookie/pulls/10/commits","review_comments_url":"https://api.github.com/repos/js-cookie/js-cookie/pulls/10/comments","review_comment_url":"https://api.github.com/repos/js-cookie/js-cookie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/10/comments","statuses_url":"https://api.github.com/repos/js-cookie/js-cookie/statuses/9adc4da866b4be23b7c7093dc122401fd2b577de","head":{"label":"js-cookie:auto-json-handling","ref":"auto-json-handling","sha":"9adc4da866b4be23b7c7093dc122401fd2b577de","user":{"login":"js-cookie","id":11557446,"avatar_url":"https://avatars.githubusercontent.com/u/11557446?v=3","gravatar_id":"","url":"https://api.github.com/users/js-cookie","html_url":"https://github.com/js-cookie","followers_url":"https://api.github.com/users/js-cookie/followers","following_url":"https://api.github.com/users/js-cookie/following{/other_user}","gists_url":"https://api.github.com/users/js-cookie/gists{/gist_id}","starred_url":"https://api.github.com/users/js-cookie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js-cookie/subscriptions","organizations_url":"https://api.github.com/users/js-cookie/orgs","repos_url":"https://api.github.com/users/js-cookie/repos","events_url":"https://api.github.com/users/js-cookie/events{/privacy}","received_events_url":"https://api.github.com/users/js-cookie/received_events","type":"Organization","site_admin":false},"repo":{"id":32531480,"name":"js-cookie","full_name":"js-cookie/js-cookie","owner":{"login":"js-cookie","id":11557446,"avatar_url":"https://avatars.githubusercontent.com/u/11557446?v=3","gravatar_id":"","url":"https://api.github.com/users/js-cookie","html_url":"https://github.com/js-cookie","followers_url":"https://api.github.com/users/js-cookie/followers","following_url":"https://api.github.com/users/js-cookie/following{/other_user}","gists_url":"https://api.github.com/users/js-cookie/gists{/gist_id}","starred_url":"https://api.github.com/users/js-cookie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js-cookie/subscriptions","organizations_url":"https://api.github.com/users/js-cookie/orgs","repos_url":"https://api.github.com/users/js-cookie/repos","events_url":"https://api.github.com/users/js-cookie/events{/privacy}","received_events_url":"https://api.github.com/users/js-cookie/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/js-cookie/js-cookie","description":"A simple, lightweight JavaScript API for handling cookies","fork":false,"url":"https://api.github.com/repos/js-cookie/js-cookie","forks_url":"https://api.github.com/repos/js-cookie/js-cookie/forks","keys_url":"https://api.github.com/repos/js-cookie/js-cookie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/js-cookie/js-cookie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/js-cookie/js-cookie/teams","hooks_url":"https://api.github.com/repos/js-cookie/js-cookie/hooks","issue_events_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/events{/number}","events_url":"https://api.github.com/repos/js-cookie/js-cookie/events","assignees_url":"https://api.github.com/repos/js-cookie/js-cookie/assignees{/user}","branches_url":"https://api.github.com/repos/js-cookie/js-cookie/branches{/branch}","tags_url":"https://api.github.com/repos/js-cookie/js-cookie/tags","blobs_url":"https://api.github.com/repos/js-cookie/js-cookie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/js-cookie/js-cookie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/js-cookie/js-cookie/git/refs{/sha}","trees_url":"https://api.github.com/repos/js-cookie/js-cookie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/js-cookie/js-cookie/statuses/{sha}","languages_url":"https://api.github.com/repos/js-cookie/js-cookie/languages","stargazers_url":"https://api.github.com/repos/js-cookie/js-cookie/stargazers","contributors_url":"https://api.github.com/repos/js-cookie/js-cookie/contributors","subscribers_url":"https://api.github.com/repos/js-cookie/js-cookie/subscribers","subscription_url":"https://api.github.com/repos/js-cookie/js-cookie/subscription","commits_url":"https://api.github.com/repos/js-cookie/js-cookie/commits{/sha}","git_commits_url":"https://api.github.com/repos/js-cookie/js-cookie/git/commits{/sha}","comments_url":"https://api.github.com/repos/js-cookie/js-cookie/comments{/number}","issue_comment_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/comments{/number}","contents_url":"https://api.github.com/repos/js-cookie/js-cookie/contents/{+path}","compare_url":"https://api.github.com/repos/js-cookie/js-cookie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/js-cookie/js-cookie/merges","archive_url":"https://api.github.com/repos/js-cookie/js-cookie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/js-cookie/js-cookie/downloads","issues_url":"https://api.github.com/repos/js-cookie/js-cookie/issues{/number}","pulls_url":"https://api.github.com/repos/js-cookie/js-cookie/pulls{/number}","milestones_url":"https://api.github.com/repos/js-cookie/js-cookie/milestones{/number}","notifications_url":"https://api.github.com/repos/js-cookie/js-cookie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/js-cookie/js-cookie/labels{/name}","releases_url":"https://api.github.com/repos/js-cookie/js-cookie/releases{/id}","created_at":"2015-03-19T15:57:47Z","updated_at":"2015-04-16T08:22:09Z","pushed_at":"2015-04-16T05:29:42Z","git_url":"git://github.com/js-cookie/js-cookie.git","ssh_url":"git@github.com:js-cookie/js-cookie.git","clone_url":"https://github.com/js-cookie/js-cookie.git","svn_url":"https://github.com/js-cookie/js-cookie","homepage":"","size":885,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":8,"forks":5,"open_issues":8,"watchers":15,"default_branch":"master"}},"base":{"label":"js-cookie:remove-json","ref":"remove-json","sha":"8cdc5c63e2a8e038a964c2eda223650cc7125d8b","user":{"login":"js-cookie","id":11557446,"avatar_url":"https://avatars.githubusercontent.com/u/11557446?v=3","gravatar_id":"","url":"https://api.github.com/users/js-cookie","html_url":"https://github.com/js-cookie","followers_url":"https://api.github.com/users/js-cookie/followers","following_url":"https://api.github.com/users/js-cookie/following{/other_user}","gists_url":"https://api.github.com/users/js-cookie/gists{/gist_id}","starred_url":"https://api.github.com/users/js-cookie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js-cookie/subscriptions","organizations_url":"https://api.github.com/users/js-cookie/orgs","repos_url":"https://api.github.com/users/js-cookie/repos","events_url":"https://api.github.com/users/js-cookie/events{/privacy}","received_events_url":"https://api.github.com/users/js-cookie/received_events","type":"Organization","site_admin":false},"repo":{"id":32531480,"name":"js-cookie","full_name":"js-cookie/js-cookie","owner":{"login":"js-cookie","id":11557446,"avatar_url":"https://avatars.githubusercontent.com/u/11557446?v=3","gravatar_id":"","url":"https://api.github.com/users/js-cookie","html_url":"https://github.com/js-cookie","followers_url":"https://api.github.com/users/js-cookie/followers","following_url":"https://api.github.com/users/js-cookie/following{/other_user}","gists_url":"https://api.github.com/users/js-cookie/gists{/gist_id}","starred_url":"https://api.github.com/users/js-cookie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js-cookie/subscriptions","organizations_url":"https://api.github.com/users/js-cookie/orgs","repos_url":"https://api.github.com/users/js-cookie/repos","events_url":"https://api.github.com/users/js-cookie/events{/privacy}","received_events_url":"https://api.github.com/users/js-cookie/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/js-cookie/js-cookie","description":"A simple, lightweight JavaScript API for handling cookies","fork":false,"url":"https://api.github.com/repos/js-cookie/js-cookie","forks_url":"https://api.github.com/repos/js-cookie/js-cookie/forks","keys_url":"https://api.github.com/repos/js-cookie/js-cookie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/js-cookie/js-cookie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/js-cookie/js-cookie/teams","hooks_url":"https://api.github.com/repos/js-cookie/js-cookie/hooks","issue_events_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/events{/number}","events_url":"https://api.github.com/repos/js-cookie/js-cookie/events","assignees_url":"https://api.github.com/repos/js-cookie/js-cookie/assignees{/user}","branches_url":"https://api.github.com/repos/js-cookie/js-cookie/branches{/branch}","tags_url":"https://api.github.com/repos/js-cookie/js-cookie/tags","blobs_url":"https://api.github.com/repos/js-cookie/js-cookie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/js-cookie/js-cookie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/js-cookie/js-cookie/git/refs{/sha}","trees_url":"https://api.github.com/repos/js-cookie/js-cookie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/js-cookie/js-cookie/statuses/{sha}","languages_url":"https://api.github.com/repos/js-cookie/js-cookie/languages","stargazers_url":"https://api.github.com/repos/js-cookie/js-cookie/stargazers","contributors_url":"https://api.github.com/repos/js-cookie/js-cookie/contributors","subscribers_url":"https://api.github.com/repos/js-cookie/js-cookie/subscribers","subscription_url":"https://api.github.com/repos/js-cookie/js-cookie/subscription","commits_url":"https://api.github.com/repos/js-cookie/js-cookie/commits{/sha}","git_commits_url":"https://api.github.com/repos/js-cookie/js-cookie/git/commits{/sha}","comments_url":"https://api.github.com/repos/js-cookie/js-cookie/comments{/number}","issue_comment_url":"https://api.github.com/repos/js-cookie/js-cookie/issues/comments{/number}","contents_url":"https://api.github.com/repos/js-cookie/js-cookie/contents/{+path}","compare_url":"https://api.github.com/repos/js-cookie/js-cookie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/js-cookie/js-cookie/merges","archive_url":"https://api.github.com/repos/js-cookie/js-cookie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/js-cookie/js-cookie/downloads","issues_url":"https://api.github.com/repos/js-cookie/js-cookie/issues{/number}","pulls_url":"https://api.github.com/repos/js-cookie/js-cookie/pulls{/number}","milestones_url":"https://api.github.com/repos/js-cookie/js-cookie/milestones{/number}","notifications_url":"https://api.github.com/repos/js-cookie/js-cookie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/js-cookie/js-cookie/labels{/name}","releases_url":"https://api.github.com/repos/js-cookie/js-cookie/releases{/id}","created_at":"2015-03-19T15:57:47Z","updated_at":"2015-04-16T08:22:09Z","pushed_at":"2015-04-16T05:29:42Z","git_url":"git://github.com/js-cookie/js-cookie.git","ssh_url":"git@github.com:js-cookie/js-cookie.git","clone_url":"https://github.com/js-cookie/js-cookie.git","svn_url":"https://github.com/js-cookie/js-cookie","homepage":"","size":885,"stargazers_count":15,"watchers_count":15,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":8,"forks":5,"open_issues":8,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/js-cookie/js-cookie/pulls/10"},"html":{"href":"https://github.com/js-cookie/js-cookie/pull/10"},"issue":{"href":"https://api.github.com/repos/js-cookie/js-cookie/issues/10"},"comments":{"href":"https://api.github.com/repos/js-cookie/js-cookie/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/js-cookie/js-cookie/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/js-cookie/js-cookie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/js-cookie/js-cookie/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/js-cookie/js-cookie/statuses/9adc4da866b4be23b7c7093dc122401fd2b577de"}}}}