title: LDAP Search json output
body: <p>In my mule flow I have an LDAP Paged Result Search as below. I want to get the output in json. I am getting back an ArrayList.</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;flow name=&quot;ldapsearchFlow1&quot; doc:name=&quot;ldapsearchFlow1&quot;&gt;
      &lt;http:inbound-endpoint exchange-pattern=&quot;request-response&quot; host=&quot;localhost&quot; port=&quot;3555&quot; doc:name=&quot;HTTP&quot;/&gt;
      &lt;ldap:paged-result-search config-ref=&quot;LDAP&quot; baseDn=&quot;${xxx.ad.base}&quot; filter=&quot;(objectClass=*)&quot; pageSize=&quot;100&quot; doc:name=&quot;LDAP&quot;&gt;
          &lt;ldap:attributes&gt;
              &lt;ldap:attribute&gt;uid&lt;/ldap:attribute&gt;
              &lt;ldap:attribute&gt;cn&lt;/ldap:attribute&gt;
          &lt;/ldap:attributes&gt;          
      &lt;/ldap:paged-result-search&gt;
       &lt;ldap:ldap-entry-to-ldif doc:name=&quot;ldap1&quot;/&gt;             
      &lt;json:object-to-json-transformer doc:name=&quot;Object to JSON&quot; /&gt;       
  &lt;/flow&gt;
  </code></pre>
  <p>Output is as below. I also dont need count , attribute count etc.</p>
  <pre><code>���sr�java.util.ArrayListx����a��I�sizexp��%w��%t�W{&quot;dn&quot;:&quot;CN=aaronj,ou=people,dc=xxx,dc=org&quot;,&quot;attributes&quot;:{&quot;count&quot;:1},&quot;attributeCount&quot;:1}t�W{&quot;dn&quot;:&quot;CN=abbasa,ou=people,dc=xxx,dc=org&quot;,&quot;attributes&quot;:{&quot;count&quot;:1},&quot;attributeCount&quot;:1}t�X{&quot;dn&quot;:&quot;CN=abbottl,ou=people,dc=xxx,dc=org&quot;,&quot;attributes&quot;:{&quot;count&quot;:1},&quot;attributeCount&quot;:1}t�\{&quot;dn&quot;:&quot;CN=abeyrathnep,ou=people,dc=xxx,dc=org&quot;,&quot;attributes&quot;:{&quot;count&quot;:1},&quot;attributeCount&quot;:1}t�Z
  </code></pre>