title: Converting json string to java object?
body: <p>I have been looking around for examples related to converting JSON strings to Java object but haven't found any good examples. The one I found was really basic once and not really dealing with complex JSON strings. </p>
  
  <p>I am making an app to translate strings from english to different languages using google translate api. Google's response upon query is...foolowing text is formatted in JSON,</p>
  
  <pre><code>{"data":{"translations":[{"translatedText":"Bonjour tout le monde"}]}} 
  </code></pre>
  
  <p>my approach so far is using GSON API, however, I am stuck by actually how should I manipulate this complicated result and create java object?</p>
  
  <p>My java class is...</p>
  
  <pre><code>import com.google.gson.Gson;
  
  public class JSONConverter {
  
  private String traslatedText;
  
  /**
   * Create an object of it self by manipulating json string
   * @param json type: String
   * @return String Translated text result from JSON responce
   */
  public String getTranslation(String json){  
      Gson gson = new Gson();
      JSONConverter obj = gson.fromJson(json, JSONConverter.class);
  
      return obj.getTranslationForReturn();
  }
  
  /**
   * Method return a translation to a private call
   * @return String translation
   */
  private String getTranslationForReturn(){
      return this.traslatedText;
   }
  }
  </code></pre>
  
  <p>Above approach is not working since I am not getting "Bonjour tout le monde" on return,</p>
  
  <p>it would be a great pleasure if someone can extend my understanding.</p>