Hi All,

I am trying to convert json payload which have nested json objects into
x-www-form-urlencoded format. Nested element values are converted to null
when performing the transformation.

I am using the following configuration with ESB 4.9.0 and 5.0.0 as well:

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse";
       name="testProxy"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <payloadFactory media-type="json">
            <format>{

"name":"user1",

"address":{"line1":"street1"},

"age":12

}

   </format>

            <args/>
         </payloadFactory>
         <property name="messageType"
                   value="application/x-www-form-urlencoded"
                   scope="axis2"
                   type="STRING"/>
         <respond/>
      </inSequence>
   </target>
   <description/>
</proxy>

The output is :
name=user1&address=&age=12

But it should be:
name=user1&address[line1]=street1&age=12

Is there any way to achieve this?

Thanks,
Keerthika.
-- 
<dev-requ...@wso2.org>
Keerthika Mahendralingam
Software Engineer
Mobile :+94 (0) 776 121144
keerth...@wso2.com
WSO2, Inc.
lean . enterprise . middleware
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to