Questions tagged [binary-serialization]

The process of translating data structures or object state into a binary format

Serialization can be defined as the process of storing the state of an object to a storage medium. During this process, the public and private fields of the object and the name of the class, including the assembly containing the class, are converted to a stream of bytes, which is then written to a data stream. When the object is subsequently deserialized, an exact clone of the original object is created.

http://en.wikipedia.org/wiki/Serialization
http://msdn.microsoft.com/en-us/library/72hyey7b(v=vs.110).aspx

178 questions
1
vote
1 answer

Deserializing derived classes with custom SerializationBinder

I am trying to deserialize some objects that were serialized with an old version of my application in order to upgrade them to the new format I am using in the new version of the application. In order to do this, I am using a custom…
Ove
  • 6,227
  • 2
  • 39
  • 68
1
vote
2 answers

binary file generation performance

I'have about 30 000 object to binary serialize in a file, I'm using with a simple foreach loop this basic code to do that : FileStream fileStream = new FileStream(pathToFile, FileMode.Create); BinaryFormatter binaryFormatter = new…
Christophe Debove
  • 6,088
  • 20
  • 73
  • 124
1
vote
1 answer

WCF not processing MSMQ message with binary format

I have a WCF Windows Service that retrieve MSMQ messages. The SubmitPurchaseOrderInMessage doesn't seem to get called neither do I see any messages in the queue. Code is shown below. WCF class: public class OrderProcessorService : IOrderProcessor { …
arjun
  • 625
  • 10
  • 27
1
vote
1 answer

Serialising takes too long with multiple process trying to write at same time

We are facing a performance issue while serialising file by multiple processes. Here is the issue: We are creating multiple processes (in distributed computing env) to do our calculation and then write down output of each processes in a file. Main…
code4fun
  • 11
  • 2
1
vote
1 answer

Is there an XML specific object (like XElement) that is binary serializable?

I have a use case where I am serializing objects over the wire via MSMQ (mostly strings). When I read the object off the queue I want to be able to tell if the user meant for the object to be a XML or a string. I was thinking a good way to do this…
Eric Schoonover
  • 47,184
  • 49
  • 157
  • 202
1
vote
3 answers

how to serialize font

I have one class and I set [Serializable] attribute to that class. in this class I define one font class member.but when I am trying to serialize it gives me an error like "system.drawing.font cannot be serialized"
Sandip
  • 481
  • 1
  • 9
  • 26
1
vote
2 answers

Binary stream library in Objective C?

Is there an equivalent in Objective C to C#'s BinaryReader and BinaryWriter? For example, a BinaryReader would take an NSData* object (or a generalised stream), and would have methods such as -(uint32_t)readUnsignedInt, -(double)readDouble, etc. A…
1
vote
0 answers

serialize object (really Mongoid document) to any binary format in Rails

I implementing async process which handle documents from mongodb database. I have something like master thread which check if new objects exist in collection and then put it to the queue (RabbitMQ), and a several handlers (currently one) which…
1
vote
1 answer

Binary Serialization Backend for Orange

Why doesn't the library Orange support a binary serialization backend in addition to its XML? Is it because D currently cannot access/reflect on its binary representation or is it just not prioritized yet? If possible what D language features and/or…
Nordlöw
  • 11,838
  • 10
  • 52
  • 99
1
vote
1 answer

Binary Serialization of List where T implements ISerializable

I have a class X which implements ISerializable #region ISerializable Members /// /// Sets up for deserialization /// /// /// private…
Harsha
  • 661
  • 1
  • 8
  • 21
1
vote
1 answer

binaryFormatter.Deserialize(stream) : Debugging and fixing errors

I'm using BinaryFormatter for serializing and deserializing custom file types. I have a stand alone application and a web application, which sould both read and write the same files. The standalone app is working fine, but when I read a file with my…
Run CMD
  • 2,937
  • 3
  • 36
  • 61
1
vote
1 answer

C# UDP Object Binary Serialization with large objects

I'm writing a network library that utilises both TCP and UDP simultaneously to transfer serialized objects over the internet. The library (simplified) is split in to a client and a server. When writing the TCP element, I'm having no trouble. Every…
Xenoprimate
  • 7,691
  • 15
  • 58
  • 95
0
votes
3 answers

Java: instantiating an enum from a number using reflection

Signalling Protocols make frequent use of Enumerated types which have well defined integer values. E.g. public enum IpHdrProtocol { TCP(6), SCTP(132), MPLS(137); int Value; IpProtocol(int value) { Value = value; } I am trying to find a way of…
Howard May
  • 6,639
  • 9
  • 35
  • 47
0
votes
1 answer

Traverse and find all given type instances within complex object graph

(using vb.Net 4.0) Say you have an object whose graph is fairly complex - it has properties, arrays and other collections, subclasses with their own properties and collections, etc. I want to fully traverse the entire object graph and find all…
Tekito
  • 840
  • 8
  • 24
0
votes
1 answer

Sporadic serialization failure in C#

We have an Excel import into our system that we test quite rigorously. Recently, we've been noticing sporadic serialization errors. These errors are popping up in our automated tests against the import, using the same file over and over. If we were…
ddango
  • 946
  • 1
  • 12
  • 25