I was wondering since I didn’t find it anywhere –
Can a Json based web service be used in conjunction with the Json.NET library?
In other words, is there a way to make JSON.NET deserialize the webservice’s request’s JSON object instead of .NET default Serializer?
One way to do it is probably declare the WebMethod to accept a plain string, and then use JSON.NET’s JsonConvert, to deserialize that raw string into the correct object, but that means that the request’s syntax (from the client side) will be kind of awkward.
Is there any other ways or suggestions of doing this?
Thanks,
Mikey
AFAIK, you have to do this manually, by having your web service take a string as argument and return a string as response. If you use WCF things are much different as the architecture is much more extensible in comparison to classic ASMX web services which by the way are considered a deprecated technology now.