So I have a json string as shown below:
{"count":1,"items":[{"rating":"teens","videos":[{"width":1280,"link":"http://192.168.195.86:1081/playback/play/99e2399e-368b","dar_image":1.7777777778,"language":"eng","duration":5166,"type":"main","id":"99e2399e-368b","dar_frame":1.7777777778,"height":720}],"trial":false,"metadata_language":"eng","year":2003,"images":[{"link":"http://192.168.195.86:1081/image/1675610d-e57e.jpg","type":"poster","id":"1675610d-e57e","orientation":"landscape"}],"id":"d0e9d382-e2d4","has_download_policy":true,"title":"Ice Bound","section":"hollywood","crew":[{"role":"director","name":"Roger Spottiswoode"}],"type":"movie","website_url":"http://192.168.195.86:1081/eng/movie/pkdaci6s-ice-bound","description":"Testin'g «ταБЬℓσ»: 1<{2 & 4+1}>3, now 20% off!@#$%^&*(). Another Testing String ","link":"http://192.168.195.86:1081/movie/d0e9d382-e2d4","slug":"pkdaci6s","categories":[{"link":"http://192.168.195.86:1081/category/ca8a9dce-514d","id":"ca8a9dce-514d","title":"Drama"}],"metadata_direction":"ltr","audio_languages":["eng"],"cast":[{"name":"Susan Sarandon"},{"name":"Aidan Devine"},{"name":"Cynthia Mace"}]}],"remaining":1}
I need to convert this to a raw string format, where all the special characters and symbols get replaced with unicode or have escape characters.
{"count":1,"items":[{"rating":"teens","videos":[{"width":1280,"link":"http:\/\/192.168.195.86:1081\/playback\/play\/99e2399e-368b","dar_image":1.7777777778,"language":"eng","duration":5166,"type":"main","id":"99e2399e-368b","dar_frame":1.7777777778,"height":720}],"trial":false,"metadata_language":"eng","year":2003,"images":[{"link":"http:\/\/192.168.195.86:1081\/image\/1675610d-e57e.jpg","type":"poster","id":"1675610d-e57e","orientation":"landscape"}],"id":"d0e9d382-e2d4","has_download_policy":true,"title":"Ice Bound","section":"hollywood","crew":[{"role":"director","name":"Roger Spottiswoode"}],"type":"movie","website_url":"http:\/\/192.168.195.86:1081\/eng\/movie\/pkdaci6s-ice-bound","description":"Testin\'g \u2xxx \u2xxx\u2xxx\u2xxx\u2xxx\u2xxx\u2xxx\u2xxx: 1<{2 & 4+1}>3, now 20% off!@#$%^&*(). Another Testing String ","link":"http:\/\/192.168.195.86:1081\/movie\/d0e9d382-e2d4","slug":"pkdaci6s","categories":[{"link":"http:\/\/192.168.195.86:1081\/category\/ca8a9dce-514d","id":"ca8a9dce-514d","title":"Drama"}],"metadata_direction":"ltr","audio_languages":["eng"],"cast":[{"name":"Susan Sarandon"},{"name":"Aidan Devine"},{"name":"Cynthia Mace"}]}],"remaining":1}
How will I do this in javascript?
All pointers are welcome.
Example link http://api.icflix.com/tv/catalogue/movies?num=1