serialization

Is it more efficient to serialize a Map or List of objects in java?

Or maybe there is no difference? The data is the same, because I need to save a Key-Value, so in case of the list I will have to implement KeyValue structure and put it into the list. ...

Working with a large data object between ruby processes

I have a Ruby hash that reaches approximately 10 megabytes if written to a file using Marshal.dump. After gzip compression it is approximately 500 kilobytes. Iterating through and altering this hash is very fast in ruby (fractions of a millisecond). Even copying it is extremely fast. The problem is that I need to share the data in this...

Reading serialised object from file

Hi everyone. I'm writing a little Java program (it's an ImageJ plugin, but the problem is not specifically ImageJ related) and I have some problem, most probably due to the fact that I never really programmed in Java before... So, I have a Vector of Vectors and I'm trying to save it to a file and read it. The variable is defined as: V...

Reading a Geocortex Session File Manually.

I have been trying to interpret a session file created by GeoCortex IMF framework manually. I know that a session file is a serialized java object. I found some code that would deserialize the object but it only reads the first line. The code is: import java.io.*; public class DeserializingObject{ public static void main(String...

Does GenerateScriptType support NonSerialized?

I have an object that's used both on the client and server side. GenerateScriptType(typeof(MyClass)) However, there are some fields that I don't need on the client, so my question is there any way to prevent those fields being serialized? (For example, Field2 and Field3 in MyClass) I tried marking the fields with [NonSerialized] but ...

.Net Xml Serialize - XSD Definition for Multiple Namespaces

The following XML was generated by serializing .Net objects: <?xml version="1.0" encoding="utf-8"?> <Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://EPS.WebServices/WebServiceSchema" > <Method xmlns="http://EPS.Library/RequestSchema"&gt;PackPlacementUpdate&lt;/Me...

Serialization Performance and Google Android

I'm looking for advice to speed up serialization performance, specifically when using the Google Android. For a project I am working on, I am trying to relay a couple hundred objects from a server to the Android app, and am going through various stages to get the performance I need. First I tried a terrible XML parser that I hacked toge...

Insert some data at later point once serialization(binary serialization) is done for a class

My application is written in C# and I am a newbie to C#. I am facing with a problem during serialization. The serialization that is used is custom serialization using ISerializable interface. The problem is as follows. There are many classes in my project and when serialization is called on one of the main class object it serializes its...

Is Java serialization a tool to shrink the memory footprint?

Hey folks, does serialization in Java always have to shrink the memory that is used to hold an object structure? Or is it likely that serialization will have higher costs? In other words: Is serialization a tool to shrink the memory footprint of object structures in Java? Edit I'm totally aware of what serialization was intended for...

LINQ to SQL serialization issue with SOAP object

OK, so this is the strangest issue in .net programming I have ever seen. It seems that object fields are serialized in .net web services in order of field initialization. It all started with Flex not accepting SOAP response from .net web service. I have found out that it was due to the order of serialized fields was statisfying the orde...

C# XML Serialisation Only Serialise Single Element in List

Given some sample XML such as: <XML> <EMPLOYEES> <EMPLOYEE isBestEmployee="false">John"<"/EMPLOYEE> <EMPLOYEE isBestEmployee="true">Joe"<"/EMPLOYEE> <EMPLOYEE isBestEmployee="false">Bill"<"/EMPLOYEE> </EMPLOYEES> </XML> How do I serialise just the employee with isBestEmployee="true" to a single Employee...

How do I get an ExtJS JsonStore to put the JSON data directly into the request body?

I have a JsonStore configured like so: var store = new Ext.data.JsonStore({ restful: true, url: '/categories', remoteSort: true, idProperty: 'Id', totalProperty: 'total', root: 'results', writer: new Ext.data.JsonWriter({ encode: false }), fields: [ 'Id', 'Name' ] }); I grab some data from ...

Substitute for Iterator that is Serialization

I'm working on a GWT project, and I have a bunch of Java classes that use Java Object Iterators on the server side. As I was reading through the internet...Iterators seem to not be serializable preventing me from sending them over to the client side from the server side. My question is is there an efficient way to serialize the iterator ...

Good book to learn c# serialization and file io

Any good book where i can learn about serialization and file IO in c# extensively? ...

OutputStream with ByteArrayOutputStream not writing

Hey again Internet ! So i'm trying to write out an object to a ByteArray, but for some reason it's not writting anything, which i see by the fact that the return value is 0, and that by the fact that reading it results in an exception. BAoutput = new ByteArrayOutputStream(); Oout = new ObjectOutputStream(BAoutput); Oout.writeObject...

Strangest LINQ to SQL case I have ever seen

OK, so this is the strangest issue in .net programming I have ever seen. It seems that object fields are serialized in .net web services in order of field initialization. It all started with Flex not accepting SOAP response from .net web service. I have found out that it was due to the order of serialized fields was statisfying the orde...

How do you stored a php serialized array in mysql with values that contain apostrophes?

I have a listing of names, that I want to store in mysql as a serialized array (for caching purposes). Some names contain apostrophes, and for some reason won't un-serliaze properly. There is no output. ...

Alternatives to Protocol Buffers

I'd like a basic message passing/RPC system. I could use a serialisation system but I want some sort of verification to ensure both ends are synchronised. I've looked at Google Protocol Buffers, but I'm not too keen on code generation. What are other alternatives? ...

A UnicodeDecodeError that occurs with json in python on Windows, but not Mac.

On windows, I have the following problem: >>> string = "Don´t Forget To Breathe" >>> import json,os,codecs >>> f = codecs.open("C:\\temp.txt","w","UTF-8") >>> json.dump(string,f) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python26\lib\json\__init__.py", line 180, in dump for chunk in iterable...

Custom ArrayList serialization

Hi, I was trying to serialize an ArrayList which contains custom objects. I'm serializing it in a Servlet (server side), and deserialize at the client side. (using ObjectOutputStream and ObjectInputStream) It worked fine, when I work with ArrayList<String>. But when I tried it with ArrayList<MyObject> I couldn't get any results in th...