title: JSON formatting (Sending JSON via jQuery AJAX post to Java/Wicket server)
body: <p>I'm using jQuery to post JSON to a Java server, but I think my JSON must be wrong. Here's an example of my data and how I'm sending it:</p>
  
  <pre><code>var lookup = {
      'name': name,
      'description': description,
      'items': [{
          'name': itemName,
          'value': itemValue
      }]
  }
  
  $.ajax({
      type: 'post',
      data: lookup,
      dataType: 'json'
  });
  </code></pre>
  
  <p>I'm using Wicket's AbstractAjaxBehavior to receive the data and would like to get a single JSON string that I can parse. When I get a Map of the parameters passed, the keyset looks like this:</p>
  
  <pre><code>items[0][name],
  description,
  name,
  items[0][value],
  </code></pre>
  
  <p>Obviously I can easily get the values for name and description, but the key for my array of items is messed up. I'm sure it's something simple, but I seem to keep running around the solution. Any suggestions? Thanks!</p>