I have looked and around and seen that it is possible to return objects serialized into Json from a WCF web service. Does anyone know how I can do this?
Thanks
I have looked and around and seen that it is possible to return objects serialized into Json from a WCF web service. Does anyone know how I can do this? Thanks |
|||||
|
You will have to add attribute to the service like this
|
|||||
|
you can do with marking your operation contract with WebGet attribute and its RequestBody, ResponseBody format. You will have to make serialization and deserialization at client side. |
|||
|
Yes it is possible you can set automaticFormatSelectionEnabled to true standardEndpoint of webHttpEndpoint in web.config like
And you need to add http header for json response to your client
|
|||||
|