title: Parse only one field in a large JSON string
body: <p>I have a JSON string of the following format:</p>
  
  <pre><code>{
  
    "foo": "small_vale"  
    "baz": "large_value"
    "bar": "another_large_value"
  
  }
  </code></pre>
  
  <p>How can I efficiently extract <code>foo</code> while ignoring the rest of the fields?
  Basically, I'm using Gson and I defined a "lean class" like that:</p>
  
  <pre><code>MyClass {
    private String foo;
  }
  </code></pre>
  
  <p>If I'm ensuring that <code>foo</code> appears first in the JSON string, would Gson still scan the whole string, or is it smart enough to stop?</p>
  
  <p>Should I use JsonPath instead?</p>