{"action":"created","issue":{"url":"https://api.github.com/repos/hapijs/qs/issues/116","labels_url":"https://api.github.com/repos/hapijs/qs/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/qs/issues/116/comments","events_url":"https://api.github.com/repos/hapijs/qs/issues/116/events","html_url":"https://github.com/hapijs/qs/issues/116","id":105765567,"number":116,"title":"Why always encode the stringified version?","user":{"login":"vvo","id":123822,"avatar_url":"https://avatars.githubusercontent.com/u/123822?v=3","gravatar_id":"","url":"https://api.github.com/users/vvo","html_url":"https://github.com/vvo","followers_url":"https://api.github.com/users/vvo/followers","following_url":"https://api.github.com/users/vvo/following{/other_user}","gists_url":"https://api.github.com/users/vvo/gists{/gist_id}","starred_url":"https://api.github.com/users/vvo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvo/subscriptions","organizations_url":"https://api.github.com/users/vvo/orgs","repos_url":"https://api.github.com/users/vvo/repos","events_url":"https://api.github.com/users/vvo/events{/privacy}","received_events_url":"https://api.github.com/users/vvo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-10T09:10:43Z","updated_at":"2015-09-11T16:35:24Z","closed_at":null,"body":"Hi, great library.\r\n\r\nI do not understand why the default when stringifying is to always encode the URI.\r\n\r\nI feel the decision to encode the URI should be left to the user. ALready providing a good deserialization/serialization mechanism is great but then why encodeURIComponent by default?\r\n\r\nEncoded URIs are not always what you want and most of the time you do not need to encode them.\r\n\r\nWhen using `.pushState` for example then you do not need to have your querystring in an encoded form.\r\n\r\nYou only need to encodeURIComponent when you store a query string inside a query string parameter (&query=full query string).\r\n\r\nOtherwise there's no need because the browser will already understand it's a query string and if you copy paste the url bar then it will be already encoded, by the browser.\r\n\r\nSo:\r\n1. What was the decision to encode it by default?\r\n2. Would you accept a PR allowing to disable this behavior (so that we do not have to decodeURIComponent on our side).\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/hapijs/qs/issues/comments/139593178","html_url":"https://github.com/hapijs/qs/issues/116#issuecomment-139593178","issue_url":"https://api.github.com/repos/hapijs/qs/issues/116","id":139593178,"user":{"login":"pho3nixf1re","id":96882,"avatar_url":"https://avatars.githubusercontent.com/u/96882?v=3","gravatar_id":"","url":"https://api.github.com/users/pho3nixf1re","html_url":"https://github.com/pho3nixf1re","followers_url":"https://api.github.com/users/pho3nixf1re/followers","following_url":"https://api.github.com/users/pho3nixf1re/following{/other_user}","gists_url":"https://api.github.com/users/pho3nixf1re/gists{/gist_id}","starred_url":"https://api.github.com/users/pho3nixf1re/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pho3nixf1re/subscriptions","organizations_url":"https://api.github.com/users/pho3nixf1re/orgs","repos_url":"https://api.github.com/users/pho3nixf1re/repos","events_url":"https://api.github.com/users/pho3nixf1re/events{/privacy}","received_events_url":"https://api.github.com/users/pho3nixf1re/received_events","type":"User","site_admin":false},"created_at":"2015-09-11T16:35:23Z","updated_at":"2015-09-11T16:35:23Z","body":"To maintain backwards compatibility it would be nice to leave it encoded by default but have an option to disable it when not needed. Most of the use cases I've came across don't need the encoding. It feels weird having to always wrap this library's output in an `unecode` call."}}