serialization

When to use XamlWriter.Save() to serialize domain object?

What's the rationale (if any) of using XamlWriter.Save() to serialize a domain object? Please describe realistic scenarios. Thanks. ...

wcf serialize linq results causes massive sql server load

Hello, I am trying to get serialized results from a WCF service from database using linq. The tables in the db are normalized to some extent and I'm returning some other data along with the on that I initially retrieve with a linq query using Data.Linq.DataLoadOptions, just like in Scott Landford's Blog: http://codeexperiment.com/post...

ISerializable: Assign an existing object on deserialization

Hello overflow, our task is quite simple, we have an object graph where each object (IDItem) has a unique ID. The object graph exists two times, on the client and on the server machine. Now we pass some serializable commands to the server. The command has as fields some of the IDItems. The IDItems implement the ISerializable interface...

Fluorine TransientAttribute and Linq-to-SQL

I've found a workaround, but I had trouble earlier this week working with FluorineFx, where I had a Linq-to-SQL–generated object I wanted to send over the wire to Flash. This object contained a property that Flash didn't need: [Association(Name="User_UserEntry", Storage="_UserEntries", ThisKey="UserID", OtherKey="UserID")] ...

Serialize WPF User Control

I have a user control which used to display data using a number of text blocks on a canvas. My intention is to be able to take all of the underlying properties from each text block (IE the top and left corners, height, width...) so I can draw them to a bitmap for printing. What would be the best approach for this? I was thinking of try...

how to Call Webservice inside PL/SQL with serializable Class in Prameter?

how can i call a web-service inside a Pl/SQL with a serialize class in the parameters. knowing that i need to get data from pl/sql and pass it to another web-service which will return the result as XML. so shall i take the data from PL/SQL as data-table or can the PL/SQL understand such complex Type as the class. if either of them how...

Is it possible to deserialize to the current class? [C#]

I have a settings class that I want to be able to serialize and deserialize to save and load settings to a file. With hindsight, I'd have designed my whole app to create an instance of settings when needed. As it is, my settings are persistent (mimicking the default application settings behaviour). Given my current architecture, I can d...

Problem in Converting a Object to Blob object

I have a serialized object which needs to be converted to 'blob' object and store into Database. Previously we used to store an object which is defined by other project objects but doest follow rules of serialization because of which it ran into numerous problems and so we decided to change the structure 'blob' object which now contains ...

Save a custom ListView's instance state?

I have a custom ListView that uses a custom ArrayAdapter (which basically just overrides getView()). This custom adapter uses as its backend a List<CustomObject>. The elements in this List are retrieved from the network, so I would like to save it in onSaveInstanceState(). However, I can't find a way to put a List<E> in a Bundle. I'm thi...

Save custom object array in instance state

I have a List<CustomObject> (where CustomObject comes from an external library -- I can't make changes to it). I want to save this in onSaveInstanceState(Bundle), but I can't seem to do it. Here are the options that I've tried: outState.putSerializable(KEY, (ArrayList<CustomObject>) myList); // because myList is instantiated as an Array...

Jetty JDBCSessionManager not serializable

Hi, I have a bit of a problem using the JDBCSessionManager in Jetty 7. For some reason the it tries to persist the SessionManager when persisting the SessionAuthentication : ... 16:46:02,455 WARN org.eclipse.jetty.util.log - Problem persisting changed session data id=b75j2q0lak5s1o2zuryj05h9y java.io.NotSerializableException: org.ecl...

XML Serialization - handling special cases

I need to XML serialize some classes, which in some cases do not adhere to the rules and guidelines, that is needed in order to make built-in serialization work. This includes properties that are interface types and properties without setters. I know how to implement IXmlSerializable, but it could be a lot of work; since most of the pr...

Serialize IDictionary of objects

I'm writing a logging framework and need to serialize each object in an IDictionary<string,object>. Object can be a simple string, int etc. or a complex business object or a collection of either. Therefore I need a flexible method for doing this. At the more complex end of things I'd like the output to be something like: Object = IList...

saving and loading data when app is running.

I would like to have at least 2 arrays which I can create when the user first saves something, and from then on read from the array when the user wants to view that data, and update the data when the user is done updating it. Does a file need to be created before hand or how is this done on the device during runtime? Just storing 2 ar...

Help with first Serialization program

Here's the code I'm using: public class Ser implements Serializable { int x,y; String name; public Ser(int a, int b, String c) { x=a; y=b; name = c; } } import java.io.*; public class testSer { public static void main(String[] args) { FileOutputStream testStream = new FileOutputStream("serText.ser"); ObjectOutput...

Binary serialization for compact framework 3.5

I just realized that CF3.5 doesn't support the binary formatter. I'm using it to send objects over the network and now need to use something else to serialize my data... I heard about Google protocol buffers but found a version that has a bug under CF... What serialization framework is good for CF? Update: I forgot to mention, I need ...

How to count number of objects stored in a *.ser file

I'm trying to read all the objects stored in a *.ser file and store them in a array of objects. How can I get the number of objects stored in that file(So that I can declare the array to be number_of_objects long)? I've checked the API and was unable to find a Desirable function. -edit- A Part of the code: Ser[] objTest2 = new Ser[num...

Any reason not to use XmlSerializer?

I just learned about the XmlSerializer class in .Net. Before I had always parsed and written my XML using the standard classes. Before I dive into this, I am wondering if there are any cases where it is not the right option. EDIT: By standard classes I mean XmlDocument, XmlElement, XmlAttribute...etc. ...

Is PHP serialization a good choice for storing data of a small website modified by a single person

Hi, I'm planning a PHP website architecture. It will be a small website with few visitors and small set of data. The data is modified exclusively by a single user (administrator). To make things easier, I don't want to bother with a real database or XML data. I think about storing all data through PHP serialization into several files. ...

Exception when serializing class which implements IEnumerable

Hi All, I'm trying to serialize a class using XmlSerializer. This class contains a member of a type which implements IEnumerable. Here is a snippet of the code: [Serializable] public class A{ private A1 m1; privte A2 m2; } [Serializable] public class A1: IEnumerable{ private List _list; } [Serializable] public class A2{ ... } [S...