Pass an array collection in JSON

being_uncertain

I am trying to pass an array collection from flex page to my backend java.Here is the code,

private function getItems():void{

                myObj  = new Object();
                myObj['dId']= dId.value.toString();
                myObj['itmList']=JSON.encode(itmList);// trying to pass like this..
                var url:String = URLManager.baseURL;
                    url = url+"myController/ReportController?do=getItems";
                    url = url+"&parameter="+ escape(JSON.encode(myObj))
                    var urlRequest:URLRequest = new URLRequest(url);
                    navigateToURL(urlRequest,"_blank");

               }

My itmList is an array collection, how can I pass it from JSon to Java controller? And how to get that in Java?

Clintm

JSON.encode the itmList source array instead. (i.e. itmList.source is an array)

Then use HTTPService instead: HTTPService AsyncToken and AsyncResponder example

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Pass an array collection in JSON

From Dev

Cannot pass JSON array to array

From Dev

Cannot pass JSON array to array

From Dev

pass a collection instead of array to fetch().then() callback

From Dev

Pass a ColdFusion Array to an Oracle Collection as a bind variable

From Dev

Pass a ColdFusion Array to an Oracle Collection as a bind variable

From Dev

How to return a collection of JSON documents as a JSON array

From Dev

Pass JSON Array to Spring Controller

From Dev

How to pass bulk of json objects into Json array

From Dev

How to Pass JSON Array using JSON Object

From Dev

How to pass json object into json array

From Dev

Encoding collection to json array in jsr 356

From Dev

How to save JSON array in to mongodb collection

From Dev

symfony 2 how to pass array collection to input select

From Dev

symfony 2 how to pass array collection to input select

From Dev

Laravel - Pass fields from array to JSON

From Dev

How to pass a JSON array as a parameter in URL

From Dev

Pass javascript array to C# via json

From Dev

In Angular, how to pass JSON object/array into directive?

From Dev

How to pass json array to postgresql function

From Dev

Pass javascript array to C# via json

From Dev

how to pass json array to select query

From Dev

Pass new php array key into json

From Dev

Laravel - Pass fields from array to JSON

From Dev

can not pass json array from PHP to JQuery

From Dev

How to pass multidimensional values to a json array?

From Dev

Ionic / Angular, pass JSON/Array value as HTML

From Dev

pass variables not in database row through json array

From Dev

Converting an array of arrays from Laravel's collection into an object with an array in json

Related Related

HotTag

Archive