I am trying to parse a json
that contians RTL
(right to left) language, in my case hebrew, using JSONObject
(org.json.JSONObject
):
JSONObject row = requestBody.getJSONObject("row"); //requestBody - json, row - the object I want to parse
and the String
with the hebrew
text:
String addr = "";
if(row.has("m_addr")){ //checking if the object has key name
addr = row.getString("m_addr"); //setting value
}
when viewing the result I get:
System.out.println(addr); // :x?x?x?x?x?
anyone knows how to set UTF-8
when parsing JSONObject
? or any other soulation?