0

wcf: how can we have benefits on using JSON serialization in our services?

odiseh
  • 25,407
  • 33
  • 108
  • 151
  • Can you elaborate on the question. What do you mean, "how can we have benefits..."? do you mean, *what does the server code look like*? Do you mean *what does the client code look like*? Do you mean *I have existing service, what do I have to do to use JSON*? Please elaborate. – Cheeso Mar 07 '10 at 11:22

2 Answers2

1

Maybe you can find some answers and references in json-or-soap-xml.

Community
  • 1
  • 1
gimel
  • 83,368
  • 10
  • 76
  • 104
1

You can use Json serialization starting from framework 3.5 (use DataContractJsonSerializer).

I think, we have benefits on using all benefits of Json format vs XML. Of course, wcf service's clients have to support this format :).

Some benefits of JSON :

JSON is well suited to data-interchange than XML.

JSON is much simpler than XML.

JSON messages have less size than the same XML ones, because json is not a document markup language.

JSON is optimized for data.

more...

garik
  • 5,669
  • 5
  • 30
  • 42