title: What format (MIME Type) should I use for HTML5 drag and drop operations?
body: <p>I'm starting to experiment with HTML5 Drag and Drop. Then, in the dragstart event handler we should run <code>setData()</code>, which receives two parameters: <em>format</em> and <em>data</em>.</p>
  
  <pre><code>function dragstart_handler(ev) {
      ev.dataTransfer.setData('text/plain', 'foobar');
  }
  </code></pre>
  
  <p>I want to drag some kind of "object" from one container into another container, inside my web application. By "object", I mean something that has multiple attributes (color, text, author, date, …).</p>
  
  <p>What kind of <em>format</em> (or MIME Type) should I use?</p>
  
  <ul>
  <li><code>text/plain</code>?</li>
  <li><code>text/x-myapp-myobjtype</code>?</li>
  <li><code>application/x-myapp-myobjtype</code>?</li>
  <li><code>application/x-myapp.myobjtype+json</code>?</li>
  <li>something else?</li>
  <li>more than one?</li>
  </ul>
  
  <p>How should I encode my object (the <em>data</em> parameter of <code>setData()</code>)?</p>
  
  <ul>
  <li>Comma-separated (or any other delimiter) key=value pairs?</li>
  <li>Serialize the object using JSON?</li>
  <li>Just an id, and at the dropzone I must retrieve the full object using just the id?</li>
  <li>Send just a reference to the object, without even serializing anything? (not possible, the <em>data</em> argument must be a string)</li>
  </ul>
  
  <p>(I realize that "How to enconde an object for Drag and Drop" could be another question here, but it is closely related to the choice of MIME Type)</p>
  
  <hr>
  
  <p>Some references:</p>
  
  <ul>
  <li><a href="http://dev.w3.org/html5/spec/dnd.html" rel="noreferrer">http://dev.w3.org/html5/spec/dnd.html</a></li>
  <li><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dnd" rel="noreferrer">http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dnd</a></li>
  <li><a href="https://developer.mozilla.org/En/DragDrop/Drag_Operations" rel="noreferrer">https://developer.mozilla.org/En/DragDrop/Drag_Operations</a></li>
  <li><a href="https://developer.mozilla.org/En/DragDrop/DataTransfer" rel="noreferrer">https://developer.mozilla.org/En/DragDrop/DataTransfer</a></li>
  <li><a href="http://www.html5rocks.com/en/tutorials/dnd/basics/" rel="noreferrer">http://www.html5rocks.com/en/tutorials/dnd/basics/</a></li>
  </ul>