@

Home 

c# Programming Glossary: serialize

XmlSerializer giving FileNotFoundException at constructor

http://stackoverflow.com/questions/1127431/xmlserializer-giving-filenotfoundexception-at-constructor

I've been working with is failing when I try to serialize types. A statement like XmlSerializer lizer new XmlSerializer.. Boolean forIntrospection I don't define any special serializers for my class. How can I fix this problem c# xml serialization..

XML Serialize generic list of serializable objects

http://stackoverflow.com/questions/1212742/xml-serialize-generic-list-of-serializable-objects

Serialize generic list of serializable objects Can I serialize a generic list of serializable objects without having to specify.. code it errors on the XMLSerializer ... line with Cannot serialize interface System.Runtime.Serialization.ISerializable. If I change.. different objects all of which are serializable. I want to serialize them all to one file. I thought the easiest way to do that would..

XML Serialization and Inherited Types

http://stackoverflow.com/questions/20084/xml-serialization-and-inherited-types

question I have been working on getting my object model to serialize to XML. But I have now run into a problem quelle surprise ... is in fact doing some clever reflection in order to serialize objects to from XML and since its based on the abstract type.. this creates a tight coupling between the class and the serializer not good . We can implement our own XmlSerializer by creating..

What is the best way to build XML in C# code? [closed]

http://stackoverflow.com/questions/284324/what-is-the-best-way-to-build-xml-in-c-sharp-code

issue with XmlSerializer is that it doesn't like to serialize immutable types everything must have a public getter and setter..

Performance Tests of Serializations used by WCF Bindings

http://stackoverflow.com/questions/3790728/performance-tests-of-serializations-used-by-wcf-bindings

to do in detail is Get to now the size of the Object being serialized Get to now the size after serizlization Time to serialize Time.. serialized Get to now the size after serizlization Time to serialize Time to deserialize I already tried some stuff but i am struggling.. the size after serizlization Time to serialize Time to deserialize I already tried some stuff but i am struggling a bit. Maybe..

Parsing JSON using Json.net

http://stackoverflow.com/questions/401756/parsing-json-using-json-net

how I would code my object so JSon.Net would know how to serialize that. I thought I could write my own simple parser to just pull.. ser new JavaScriptSerializer Foo foo ser.Deserialize Foo json Edit Json.NET works using the same JSON and classes... using the same JSON and classes. Foo foo JsonConvert.DeserializeObject Foo json Link Serializing and Deserializing JSON with..

Serialize Class containing Dictionary member

http://stackoverflow.com/questions/495647/serialize-class-containing-dictionary-member

Expanding upon my earlier problem I've decided to de serialize my config file class which worked great. I now want to store.. 'App.ConfigFile'. snip System.NotSupportedException Cannot serialize member App.Configfile.mappedDrives snip From what I've read.. From what I've read Dictionaries and HashTables can be serialized so what am I doing wrong XmlRoot ElementName Config public..

Omitting all xsi and xsd namespaces when serializing an object in .NET?

http://stackoverflow.com/questions/625927/omitting-all-xsi-and-xsd-namespaces-when-serializing-an-object-in-net

s.Serialize xmlWriter objectToSerialize The resulting serialized document includes namespaces like so message xmlns xsi http.. xsi and xsd namespaces I can follow the answer from How to serialize an object to XML without getting xmlns … . I want my message..

.NET XML serialization gotchas? [closed]

http://stackoverflow.com/questions/67959/net-xml-serialization-gotchas

C# XML serialization that I thought I'd share You can't serialize items that are read only like KeyValuePairs You can't serialize.. items that are read only like KeyValuePairs You can't serialize a generic dictionary. Instead try this wrapper class from http.. reader.ReadStartElement key TKey key TKey keySerializer.Deserialize reader reader.ReadEndElement reader.ReadStartElement value..

Deep cloning objects in C#

http://stackoverflow.com/questions/78536/deep-cloning-objects-in-c-sharp

The type must be serializable. source Don't serialize a null object simply return the default for that object if Object.ReferenceEquals.. source stream.Seek 0 SeekOrigin.Begin return T formatter.Deserialize stream The idea is that it serializes your object and then.. return T formatter.Deserialize stream The idea is that it serializes your object and then deserializes it into a fresh object. The..

Serializing private member data

http://stackoverflow.com/questions/802711/serializing-private-member-data

private member data I'm trying to serialize an object to XML that has a number of properties some of which.. ISerializable interface. Below is the code I'm using to serialize my object. public void SaveMyObject MyObject obj XmlSerializer.. public void SaveMyObject MyObject obj XmlSerializer serializer new XmlSerializer typeof MyObject TextWriter tw new StreamWriter..

Data binding dynamic data

http://stackoverflow.com/questions/882214/data-binding-dynamic-data

you have a lot of time for this you may do well to simply serialize it in whatever mechanism you are happy with but rehydrate it..

Parse JSON in C#

http://stackoverflow.com/questions/1212344/parse-json-in-c-sharp

Encoding.Unicode.GetBytes json DataContractJsonSerializer serialiser new DataContractJsonSerializer obj.GetType ms.Close.. DataContractJsonSerializer serialiser new DataContractJsonSerializer obj.GetType ms.Close return obj Deserialise from JSON Serializable.. Encoding.Unicode.GetBytes json DataContractJsonSerializer serializer new DataContractJsonSerializer obj.GetType obj T..

Deserialize JSON into C# dynamic object?

http://stackoverflow.com/questions/3142495/deserialize-json-into-c-sharp-dynamic-object

a bunch of classes in order to use the DataContractJsonSerializer. c# .net json serialization dynamic share improve this question.. IDictionary string object dictionary Type type JavaScriptSerializer serializer if dictionary null throw new ArgumentNullException.. dictionary null public override IDictionary string object Serialize object obj JavaScriptSerializer serializer throw new NotImplementedException..

Performance Tests of Serializations used by WCF Bindings

http://stackoverflow.com/questions/3790728/performance-tests-of-serializations-used-by-wcf-bindings

data . I need the to compare the Performance of different Serializers used by the different forms of bindings for WCF Services basicHttpBinding.. WCF adds however results first BinaryFormatter Length 1314 Serialize 6746 Deserialize 6268 XmlSerializer Length 1049 Serialize 3282.. Length 1314 Serialize 6746 Deserialize 6268 XmlSerializer Length 1049 Serialize 3282 Deserialize 5132 DataContractSerializer..