title: JSONPath resolver for Java objects
body: <p>How can I get a value from an Java object instead from a JSON string by applying a JSONPath expression?</p>
  
  <hr>
  
  <p>I receive a Java object that is created from a JSON string (via Jackson, no way to influence it):</p>
  
  <pre><code>public class MyJSONInputClass {
      private String foo;
      private int[] bar = { 1, 5, 9 };
      private OtherClass baz;
      ....
  }
  </code></pre>
  
  <p>I further have some JSONPath expressions as Java Strings reflecting values in the object (they might be much more complex):</p>
  
  <pre><code>"$.foo"
  "$.bar[5]"
  "$.baz.someProperty"
  </code></pre>
  
  <p>I want to resolve those expressions using the resulting java object (instance of MyJSONInputClass, after unmarshalling):</p>
  
  <pre><code>public Object resolve(MyJSONInputClass input, String expression) {
      ...
  }
  </code></pre>