akmalfadli / google-api-translate-java

Automatically exported from code.google.com/p/google-api-translate-java
0 stars 0 forks source link

While using json-20090211.jar language Detect throws org.json.JSONException: JSONObject["responseData"] is not a JSONObject #177

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying detect a language entered by the user in a text box.
DetectResult detectResult =  Detect.execute(text);
or 
String abc = Detect.execute(text).getLanguage().toString();

expected output:

Language of entered text
Ex: "Hello World" language should be 'en'

instead exception raised
org.json.JSONException: JSONObject["responseData"] is not a JSONObject.
    at org.json.JSONObject.getJSONObject(JSONObject.java:520)
    at com.google.api.detect.Detect.execute(Detect.java:58)

What version of the product are you using? On what operating system?
version: json-20090211.jar. 
Operating system:Windows 7

Original issue reported on code.google.com by ramesh.k...@gmail.com on 21 Dec 2012 at 4:16