Showing posts with label json. Show all posts
Showing posts with label json. Show all posts

Wednesday, March 28, 2012

Why JSON?

Say, please, what was the main reason to use JSON object serializing in Atlas instead of SOAP? Easy deserializing? Or light weight? Or something else?

And will Atlas support SOAP in the future?

Thanks.

Pavel,

Easy deserializing is indeed a big part of it. The ability to just call JavaScript's 'eval' instead of having to reconstruct an object graph from an XML DOM makes JSON much easier to you. JSON is also a more concise format.

It is conceivable that Atlas will support SOAP in the future.

David


Thanks for quick answer.

Wednesday, March 21, 2012

writing json back to client

I am making an xmlhttp request (using the scripts provided inAjax for Web Application Developersby Kris Hadlock) to get data from an aspx page. When I create a dataset and return xml with an xmldocument it works fine. I am using the following where dsreturn is the getXML of the dataset.

Dim xdocAs XmlDocument =New XmlDocument()

xdoc.LoadXml(dsreturn)

xdoc.Save(Response.OutputStream)

The problem is that I also want to return json. I have created a biz class to parse a dataset and return a json string. I know this works because I have used it in other web services. When I do this I get nothing. I think that my problem is how to return the json string in the response.outputstream. I am not sure how to do this. Just using response.write doesnt seem to work.

Thanx

Have you considered using page methods instead of doing it all by hand? They return JSON by default.

XML to JSON Conversion Utility

Is there an XML Document to JSON conversion utility, like with Ajax.NET Pro, available with MS ajax.net?

TIA

See sample therehttp://www.phdcc.com/xml2json.htm