JSON.stringify and encodeuricomponent

Viewed 18986

My string for my AJAX GET request looks like the following:

return domain + '?x=' + JSON.stringify(x)

Do need to use encodeUriComponent to make the URI valid? For example:

return domain + '?x=' + encodeURIComponent(JSON.stringify(x))
4 Answers
Related