title: MIME versus JSON for HTTP POST body
body: <p>We have a HTTP RPC api for which all of the arguments are to be encoded using JSON. This works, but it actually does not feel very elegant to have a mix of MIME x-www-form-urlencoding and JSON in the body of the http post. I.e. the body might look like this:</p>
  
  <pre><code>POST /my/rpc/api/endpoint
  
  foo={"x":123,"y":true}&amp;bar=[1,2,3,4,5,6,7]
  </code></pre>
  
  <p>I have seen services that don't use MIME at all and go for full json encoding. E.g:</p>
  
  <pre><code>POST /my/rpc/api/endpoint
  
  {"foo":{"x":123,"y":true},"bar":[1,2,3,4,5,6,7]}
  </code></pre>
  
  <p>I think the latter solution looks much cleaner, however I am not quite sure if this is a violation of HTTP conventions and which implications this would have. Is this something to avoid? Would this make it harder to implement clients for example? </p>