Ragunath Jawahar
Ragunath Jawahar

Reputation: 19733

JSON response contains characters represented as decimals

My JSON response contains characters in decimal format such as

My Friend's Story

instead of

My Friend's  Story

How do I convert them properly?

Upvotes: 0

Views: 500

Answers (2)

Buhake Sindi
Buhake Sindi

Reputation: 89179

That's simple: You can use org.json.JSONTokener to solve your problem....

String json = "\"My Friend's Story\""; 
String value = (String)new JSONTokener(json).nextValue();

Upvotes: 0

methodin
methodin

Reputation: 6710

See Decode HTML entities in android

Upvotes: 2

Related Questions