Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
greengiant83
Visitor

How to decode \u0026 in url

I am requesting JSON from a remote server and one of the url properties has \u0026 in place of the ampersand in the url's query string.

For example instead of:
http://mydomain.com/getvideo?id=101&foo=bar

It is returning
http://mydomain.com/getvideo?id=101\u0026foo=bar

What kind of encoding is this? How can decode the url so Roku can play it?
0 Kudos
1 REPLY 1
belltown
Roku Guru

Re: How to decode \u0026 in url

"greengiant83" wrote:
I am requesting JSON from a remote server and one of the url properties has \u0026 in place of the ampersand in the url's query string.

For example instead of:
http://mydomain.com/getvideo?id=101&foo=bar

It is returning
http://mydomain.com/getvideo?id=101\u0026foo=bar

What kind of encoding is this? How can decode the url so Roku can play it?

What are you using to decode your JSON?

If you use the JSONDecoder parser in GitHub (see this post: http://forums.roku.com/viewtopic.php?f=34&t=49609) then it should automatically change the \u0026 into an ampersand.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.