title: How to parse JSON in Java
body: <p>I have the following JSON text. How can I parse it to get the values of <code>pageName</code>, <code>pagePic</code>, <code>post_id</code>, etc.?</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;pageInfo&quot;: {
      &quot;pageName&quot;: &quot;abc&quot;,
      &quot;pagePic&quot;: &quot;http://example.com/content.jpg&quot;
    },
    &quot;posts&quot;: [
      {
        &quot;post_id&quot;: &quot;123456789012_123456789012&quot;,
        &quot;actor_id&quot;: &quot;1234567890&quot;,
        &quot;picOfPersonWhoPosted&quot;: &quot;http://example.com/photo.jpg&quot;,
        &quot;nameOfPersonWhoPosted&quot;: &quot;Jane Doe&quot;,
        &quot;message&quot;: &quot;Sounds cool. Can't wait to see it!&quot;,
        &quot;likesCount&quot;: &quot;2&quot;,
        &quot;comments&quot;: [],
        &quot;timeOfPost&quot;: &quot;1234567890&quot;
      }
    ]
  }
  </code></pre>