Hi Senduran, IMHO x-www-form-urlencodedis for simple key value pairs. When the payload is complicated, we should use multipart/form-data instead of x-www-form-urlencoded content type. It can handle any complex complex scenarios that you mentioned.
Thanks Thusitha On Wed, Jan 3, 2018 at 4:50 PM, Senduran Balasubramaniyam <[email protected] > wrote: > Hi all, > > When an XML or a JSON is converted to x-www-form-urlencoded format the > key value pair is created. > i.e > > <root> > <key1>value1</key1> > <key2>value2</key2> > </root> > > will be converted to key1=value&key2=value2 > > similarly > > {"key1" : "value1", "key2" : "value2"} also get converted to > key1=value&key2=value2 > > But what if the XML or JSON is not only having simple key value i.e having > an array or a child element > > for example, > <root> > <key1>value1</key1> > <key2> > <subkey1>subvalue1</subkey1> > <subkey2>subvalue2</subkey2> > </key2> > </root> > > similarly for JSON like > {"key1" : "value1", "key2" : {"subkey1" : "subvalue1"}} or > > JSON with array > {"key1" : "value1", "key2" : ["arrayvalue1", "arrayvalue2"]} > > > Kindly let me know the available correct formats for > application/x-www-form-urlencoded content type. > Further it will be really helpful if you could point to a specification or > a standard document > > Thanks > Senduran > > > -- > *Senduran * > Senior Software Engineer, > WSO2, Inc.; http://wso2.com/ <http://wso2.com/> > Mobile: +94 77 952 6548 <077%20952%206548> > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > --
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
