title: Passing JSON or similar object via URL and parsing in PHP
body: <p>The situation is as follows:</p>
  
  <p>Due to circumstances beyond my control, I'm writing a back-end which exposes data ONLY through JSON.</p>
  
  <p>The UI is pure HTML/jQuery. All queries from the UI result in a JSON object (often quite complex). I need the UI to be able to pass me a complex object which includes multiple lists of Ids and strings.</p>
  
  <p>What's the neatest way to implement this?</p>
  
  <ul>
  <li>Multiple GET/POST params, some of which are lists eg <code>&amp;List=1,2,3</code></li>
  <li>A Full JSON Object as a single Param eg <code>?Data={"List"=[1,2,3]}</code></li>
  <li>Something else entirely.</li>
  </ul>
  
  <p>If you've done something similar, I'd be interested in your experiences - especially with regards to passing object definitions to the client.</p>
  
  <p>In this instance, imagine the following Data packet...</p>
  
  <pre><code>{
      Id: 1,
      Status: "Processing",
      RecordTypeAIds: (1,2,3)
      RecordTypeBIds: (4,5,6)
      RecordTypeCIds: null
  }
  </code></pre>
  
  <p>What's the neatest way to send this information from jQuery to PHP (bearing in mind, lists may potentially be nested n-deep)</p>
  
  <p>Thanks for any help you can provide.</p>