title: Query a JSONObject in java
body: <p>I was wondering if somewhere out there exists a java library able to query a JSONObject. In more depth I'm looking for something like:</p>
  
  <pre class="lang-java prettyprint-override"><code>String json = "{ data: { data2 : { value : 'hello'}}}";
  
  ...
  // Somehow we managed to convert json to jsonObject
  ...
  
  String result = jsonObject.getAsString("data.data2.value");
  
  System.out.println(result);
  </code></pre>
  
  <p>I expect to get "hello" as output.</p>
  
  <p>So far, the fastest way I have found is using Gson:</p>
  
  <pre class="lang-java prettyprint-override"><code>jsonObject.getAsJsonObject("data").getAsJsonObject().get("data2").getAsJsonObject("value").getAsString();
  </code></pre>
  
  <p>It's not actually easy to write and read. Is there something faster?</p>