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..
|