Click here to Skip to main content
15,745,270 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I have one class called "Device " and it declaration like as follow:

public class Device
        public int DeviceID { set; get; }
        public string UserName { set; get; }


I want to create one WCF where this service will return Device object in from of JSON.
can anyone tell me how to do it. And i also would like to know how i will consume this WCF...plz tell me its urgent
Manfred Rudolf Bihy 31-Jul-11 3:33am    
Since you asked so nicely I will comply.

Hey man! You know what? This is really urgent.
Sergey Alexandrovich Kryukov 1-Aug-11 11:46am    
Great answer!
spydeehunk 1-Aug-11 13:40pm    
RaisKazi 31-Jul-11 3:52am    
Do you want to return "JSON Object" OR Serialized string of your class object in JSON format?
spydeehunk 31-Jul-11 3:58am    
Serialized string of your class object in JSON format

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900