David Robbins
David Robbins

Reputation: 10046

How can you create an ASP.Net 2.0 web service that consumes and produces JSON objects?

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?

Upvotes: 1

Views: 1670

Answers (5)

Kon
Kon

Reputation: 27441

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

Upvotes: 1

IEnumerator
IEnumerator

Reputation: 2972

use JayRock!

JayRock will work with .net 2.0

http://jayrock.berlios.de/

Upvotes: 2

kenny
kenny

Reputation: 22404

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

Upvotes: 0

Joe Basirico
Joe Basirico

Reputation: 1985

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

Upvotes: 1

Ray Lu
Ray Lu

Reputation: 26668

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

Upvotes: 0

Related Questions