Sending JSON collection to ASMX webservice

Posted by Mironline on Stack Overflow See other posts from Stack Overflow or by Mironline
Published on 2012-03-19T09:52:47Z Indexed on 2012/03/19 10:04 UTC
Read the original article Hit count: 261

Filed under:
|
|
|

I have got this json collection in page :

var json=
         {
            "Elements":
               [
                {"Alignment":null,"Bold":false},
                {"Alignment":null,"Bold":false}
               ],
               "Front":true,
                "ThemeID":"9"
        };

I've generated this JSON in run-time & posted to page.

my question is , What is the best solution to send this json to web-service using jQuery.

  1. should I use the JSON.stringify method and sent it as as string ? if yes what is the input type in web-service ?

  2. can I send it as an object to web-service and set the List<CusomeObject> as input ? in this case how can I implement that ?

© Stack Overflow or respective owner

Related posts about c#

Related posts about jQuery