views:

39

answers:

2

I'm running into a lot of troubles trying to do a post request from my jQuery code passing a JSON object to my webservice method.

I know this question might seem to be pointless, but I wanted to know how WCF recognize a JSON string and converts it into a object. What should we configuring to have the warranty that it should work?

I followed several pages and blog posts like this but I can't get it working. Every time the service code is hit, the parameter comes as a null object!

Any advise, tips, inner workings that we should be aware of ?

A: 

Why not pass in the json data as a string to your web service, and then on the other side you can deserialize, but how to do that depends on your version of .net. You may want to look at what is available at http://json.org.

James Black
A: 
var json_object = json_string.evalJSON()

that's for prototype sorry.... with jQuery it's:

var json_object =jQuery.parseJSON(json_string)
mna