Hi, Try following
var tagElement=<jsonObject><?xml-multiple?><tags><jsonElement> TestTag</jsonElement></tags></jsonObject>; On Wed, Jul 23, 2014 at 1:52 PM, Jay <[email protected]> wrote: > Hi Malaka, > > I have tried with your solution but it didn't work. > > following is my javascript code: > > var > tagElement=<tags><?xml-multiple?><jsonElement>TestTag</jsonElement></tags>; > > payloadXML.tags=tagElement; > > This will create JSON payload as : > > {"tags":"TestTag"} > > But the requirement is: > {"tags":["TestTag"]} > > I have enabled following message builder/formatter as well, > > <messageFormatter contentType="application/json" > > class="org.apache.synapse.commons.json.JsonFormatter"/> > <messageBuilder contentType="application/json" > > class="org.apache.synapse.commons.json.JsonBuilder"/> > > Regards, > Janaka > > > > -- > View this message in context: > http://wso2-oxygen-tank.10903.n7.nabble.com/ESB-Problems-sending-numeric-keys-in-JSON-Payloads-tp99789p100001.html > Sent from the WSO2 Development mailing list archive at Nabble.com. > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > -- Best Regards, Malaka Silva Senior Tech Lead M: +94 777 219 791 Tel : 94 11 214 5345 Fax :94 11 2145300 Skype : malaka.sampath.silva LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77 Blog : http://mrmalakasilva.blogspot.com/ WSO2, Inc. lean . enterprise . middleware http://www.wso2.com/ http://www.wso2.com/about/team/malaka-silva/ <http://wso2.com/about/team/malaka-silva/> Save a tree -Conserve nature & Save the world for your future. Print this email only if it is absolutely necessary.
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
