Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is Serialization
Message
From
02/12/2004 05:20:23
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00966280
Message ID:
00966295
Views:
8
>I've seen many rferences recently to 'Serilaization' in Dot Net and have never come across this concept in VFP.
>
>Anybody care to give an explanation of whet Serialization is and a few examples of how it can be used ?
>
>Regards,
>
>Gerard

Gerard,
Warning:I'm not very good with terminology

Serialize - convert and save a persistent version (conversion might be needed to transform say an object to human readable represantation - not necessarily be human readable).

XML classes are serializable. ie: A dataset is an object (for a moment forget it's also already an xml) with its tables, relations etc. When you serialize it you get something like:
<dataset>
...
</dataset>
Or think of a web service. Web services transfer their data using XML but under the hood you get 'deserialized' version as an object. You cannot directly save an object. To save it first you serialize and it's back an xml representation.

ie: Assuming you use VS.Net and added reference to below web service (LTBJ is my nearest airport's code which I got calling searchByCountry of web service)
{
//http://live.capescience.com/wsdl/GlobalWeather.wsdl
Weather.GlobalWeather gw = new Weather.GlobalWeather();
Weather.WeatherReport wr = gw.getWeatherReport("LTBJ");
XmlSerializer xs = new XmlSerializer(typeof(Weather.WeatherReport));
TextWriter writer =  new StreamWriter("c:\\temp\\weatherreport.xml");
xs.Serialize(writer, wr);
}
you'd see that wr is an object in IDE with some public fields (some of them are arrays).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform