title: How to build JSON Request Body?
body: <p>I'm trying to build the following JSON Request Body.</p>
  
  <p>It's my first time with JSON and I'm following <a href="http://code.google.com/p/json-simple/wiki/EncodingExamples#Example_1-1_-_Encode_a_JSON_object" rel="nofollow">this</a> examples, but still struggling.</p>
  
  <p>I've been taking a look to GSON but wanted to manage pure JSON first, and maybe for something so small it's not worth it to add GSON library?</p>
  
  <p>Could you help me with the code?</p>
  
  <p>Thanks.</p>
  
  <pre><code>{
     locations:
     [
        {
           latLng:
           {
              lat: 40.900799,
              lng: 8.606102
           }
        },
        {
           latLng:
           {
              lat: 42.900799,
              lng: 9.606102
           }
        }
     ]
  }
  </code></pre>
  
  <p>EDIT:</p>
  
  <p><a href="http://www.mapquestapi.com/directions/#matrix" rel="nofollow">Here</a> is the Web Service I am trying to consume and <a href="http://www.mapquestapi.com/directions/#matrix" rel="nofollow">here</a> a request sample.</p>