title: Square brackets in application/x-www-form-urlencoded message format (wso2 ESB 5.0)
body: <p>I am trying to send a request through wso2 ESB 5.0.0 to external HTTP API  which require <code>application/x-www-form-urlencoded</code> format. I found this post:</p>
  
  <p><a href="https://stackoverflow.com/questions/37331115/sending-content-type-application-x-www-form-urlencoded-wso2-esb">Sending Content-Type application/x-www-form-urlencoded WSO2 ESB</a></p>
  
  <p>and it's almost works, but this vendor also require parameters in array format like this:</p>
  
  <p><code>to[email@email.com][message_id]=message_id</code></p>
  
  <p>Unfortunately xml nor json doesn't allow me to build parameters with square brackets in xml node names or in json key names. Escaping through <code>%5B</code> <code>%5D</code> also won`t help. </p>
  
  <p>I also tried ExpandingMessageFormatter but with no success - I can`t build  well-formed property and replace message of a body with it's content. For example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;property name="messageBody" scope="default" type="STRING" value="to%5Bemail%40email.com%5D%5Bmessage_id%5D=id&amp;amp;to%5Bemail%40email.com%5D%5Breciver_name%5D=Name%20Surname&amp;amp;smtp_account=2.xxx.smtp&amp;amp;subject=Test%20temat&amp;amp;html=%3Chtml%3E%3Cb%3ETEST%3C%2Fb%3E%3C%2Fhtml%3E&amp;amp;from=email%40email.com&amp;amp;from_name=xxx"/&gt;
      &lt;payloadFactory media-type="json"&gt;
          &lt;format&gt;"$ctx:messageBody"&lt;/format&gt;
          &lt;args/&gt;
      &lt;/payloadFactory&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>or with EnrichMediator:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;enrich&gt;
          &lt;source clone="true" property="messageBody" type="property"/&gt;
          &lt;target type="body"/&gt;
      &lt;/enrich&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Please, any advise will be helpful. </p>