Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 28th, 2013, 10:33 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default JSON Serialization

Based on the book on pages 371 talking about JSON, I am still confused about the mechanics of how all of this works. I have been trying to do the research looking at other stuff online and at training videos and other books, and I am not sure how it all works. So is this how it all works???:
The server takes a ASP.NET object serializes it into JSON so that the Java Script running on the front end client can then more easily rehydrate that serialized JSON object and parse it to use inside of the Javascript (as JSON is much better for this than XML)that is running on the front end of the client, then once Javascript on the client is through using and doing its thing with the JSON material(objects) passed from it by the server, the server then can take the Javascript object(s) that are passed back to it from the client and serialize them back into JSON?? Is that the mechanics or the ebb and flow of how it all works?
In a nutshell:
ASP.NET Object serialized into JSON ------> JQuery/Javascript on client gets serialized JSON Object, parses it uses it to do what it needs to do. Then--------> Javascript object is passed back to server, Javascript objects gets serialized back into JSON on the server so that it can be used to be put back into ASP.NET objects?
Kind of like maybe:
Response.Format = WebMessageFormat.Json
In other words The serializer will take a message and deserialize into an object or it can take an object and serialize back into a message? Is that correct?

Tough question I know, but I am simply not really grasping how the mechanics of how all of this works. I can't seem to wrap my head around it all. If you could help un-confuse me on this concept I would be very grateful.

Last edited by vbboyd; April 28th, 2013 at 11:04 PM..
 
Old April 29th, 2013, 07:07 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, this is more or less how it works, except that the object that is sent back is also JSON.

This is way too much for me to answer over a forum post, and especially since it's getting too off-topic (too advanced) for the Beginner's forum. Try Google to dig deeper into this and then post in the Pro category with specific questions. Otherwise, it's almost impossible to answer this without writing replies the size of a blog or article.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
C# and JSON throp BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 2 March 12th, 2009 10:51 AM
serialization taheernawaz ASP.NET 1.x and 2.0 Application Design 0 December 12th, 2007 03:32 AM
is serialization required for this? hertendreef ASP.NET 2.0 Basics 0 March 24th, 2007 05:54 AM
question about Serialization hertendreef ASP.NET 2.0 Basics 2 February 27th, 2007 04:03 PM
Hashtable for Serialization in C# sachin-csharp .NET Framework 2.0 0 July 27th, 2004 02:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.