1

I would like create a web service in ASP.Net 2.0 that will supports JSON. Is there a way to do this without WCF and .Net 3.5? Can anyone point me to a good article or sample code?

Clarification

I need direction on what is the best method, using the .Net 2.0 framework, to communicate JSON objects to a client. Is it possible to do this without serializing the object to a string and then deserializing on the client?

David Robbins
  • 9,996
  • 7
  • 51
  • 82

5 Answers5

2

use JayRock!

JayRock will work with .net 2.0

http://jayrock.berlios.de/

IEnumerator
  • 2,960
  • 5
  • 31
  • 33
1

WCF is great, but requires .net 3.5.

Check out this article on MSDN that describes quite a bit about JSON and asp.net from an introductory level.

http://msdn.microsoft.com/en-us/library/bb299886.aspx

Joe Basirico
  • 1,935
  • 16
  • 17
1

You can't do it with standard 2.0 without serialization.

Kon
  • 27,113
  • 11
  • 60
  • 86
0

You can utilize WCF for your website, The WCF JSON endpoint can even generate javascript client proxy for the service.

Check out this post

REST / SOAP endpoints for a WCF service

A download sample can be found

http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html

Community
  • 1
  • 1
Ray Lu
  • 26,208
  • 12
  • 60
  • 59
0

I found this API for LINQ to JSON very helpful and easy.

kenny
  • 21,522
  • 8
  • 49
  • 87
  • Thanks - I use JSON.Net currently. What I am looking for is the ability for a web written in .Net 2.0 to return JSON objects. In other words, I don't want to serialize objects and transmit the serialized string. – David Robbins Oct 28 '08 at 22:58
  • Isn't JSON serialized by its nature? Javascript Serialized Object Notation(?) – kenny Oct 30 '08 at 11:06