title: Is there a Java class that can represent an arbitrary Javascript object?
body: <p>I'm looking for a java class that is able to represent a dynamic javascript object.  This is so that I can move from and to Json while providing easy access to the data.  I would like this class to have access methods similar to what you would expect in a javascript object.</p>
  
  <pre><code>Preferences p = new Preferences(...);
  
  p.getString("a");
  p.getInteger("a");
  p.getObject("a");
  </code></pre>
  
  <p>All of the above would cast to the appropriate type or return null.  Now the key part should be able to be something like this:</p>
  
  <pre><code>p.getString("a.b.c");
  p.getString("a[0].b.d[1]");
  </code></pre>
  
  <p>And so on.  Is there something already done that handles like this?</p>