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
2
votes
3 answers

How to loop through a file to get data?

I am trying to make a basic login and sign up c# console application, however, I need to loop through my file to see if the username and password the user inputted has a match when logging in. If the user types in a username and password, I want my…
d51
  • 316
  • 1
  • 6
  • 23
2
votes
1 answer

Problem with Lists of custom type and Serialization

We are working on releasing version 2.0 of one of our products, and we want to maintain file compatibility with the installed base of version 1.0 customers. I have been implementing ISerializable on most of the types in our application, and seem to…
2
votes
1 answer

C# - Binary Serialization InvalidCastException

So I have a class called OutputInformation which I'd like to store and then read on another computer to retrieve the data. I'm using binary serialization. [Serializable()] public class OutputInformation { public List filenames { get;…
user7247317
2
votes
3 answers

Binary Serialized File - Delphi

I am trying to deserialize an old file format that was serialized in Delphi, it uses binary seralization. I know nothing about the structure of the file except some very high level records that are in it. What steps would you take to solve this…
kyndigs
  • 3,074
  • 1
  • 18
  • 22
2
votes
2 answers

getting "unable to find assembly" when trying to deserialize, works from client to server but not the other way

I've read plenty of similar questions and answers on this topic, but still not sure why I get this problem. I have a client and server projects, both using the same dll library I created. when I serialize an object on the client, I have no problem…
Nadav
  • 21
  • 1
2
votes
1 answer

Is there a shortcut to binary-serialize every property in an object?

If there is an object in which every public property must be serialized and properties are simple (just numbers or strings or objects already implementing ISerializable), is there an easy way to do it without having to create…
Arseni Mourzenko
  • 50,338
  • 35
  • 112
  • 199
2
votes
0 answers

Binary serialization/deserialization without additional attributes or default public constructor

I need to binary serialize an object that contains a collection of lots of instances of some base class. Each instance could be any of the derived types, and there are really lots of possible derived types (around one hundred). Therefore I don't…
bashis
  • 1,200
  • 1
  • 16
  • 35
2
votes
2 answers

Combine multiple file streams into a single file?

I have an application where I am persisting a large amount of binary data fairly quickly. I currently have two different data channels that can grow in size independently, so I store this using two files. However, these two files are closely…
Dan Bryant
  • 27,329
  • 4
  • 56
  • 102
2
votes
1 answer

Binary serialization of arbitrary objects beween Objective C and C#?

We want to pass a forest - a dictionary with values which can be: dictionaries, arrays, sets, numbers, strings, byte buffers - between Objective C and C# efficiently (time-wise, space is a lesser concern). Google's Protocol Buffers looked good, but…
2
votes
1 answer

Is there any limits for binary serialization / deserialization object graph size in .net?

For example, i have: struct SomeStruct { //some fields //each instance will store info read from file, maybe be 3kb, maybe more. } List lst = new List(); I will add to that list crazy amount of objects, so it will end…
Kosmo零
  • 4,001
  • 9
  • 45
  • 88
2
votes
1 answer

Protocol Buffer to Serialize C++ and and Deserialize to C# class

Is it possible to Serialize a class in C++ and deserialize it to a similar class in C# using protocol buffer? I have tried Json serialization to overcome this serialization issue in different platforms but it has issues on some data types such as…
Navin
  • 554
  • 2
  • 9
  • 31
2
votes
1 answer

.net serialization: how to selectively ignore data fields

In. Net you can mark a field as non serializable, and it will be skipped during serialization. I'm looking for a simple method that will allow me to control in runtime whether a specific field should be serialized.
Ophir Yoktan
  • 8,149
  • 7
  • 58
  • 106
2
votes
0 answers

VS2010 build-time serialization for fast run-time loading?

In Visual Studio 2010 under .NET4, is there a good way to instance, populate, and binary-serialize classes as part of the build process? I am writing an application which takes several seconds to load a complex set of interrelated classes to the…
2
votes
1 answer

Easy Bit-Level Serialiation

I'm looking for a C++ API to conveniently an efficiently serialize/unserialize (user-defined) types of arbitrary bit-size into some structure (preferrably template class) containing a set of bits. I believe boost::dynamic_bitset is good start but it…
Nordlöw
  • 11,838
  • 10
  • 52
  • 99
1
vote
2 answers

C++: Custom object serialization/deserialization failing

I'm having problems reading a serializaed object back from its stored file. (See code below). The serialization process "works", (albeit, probably written very poorly), and because there is no way of knowing whether the user is passing a…
Casey
  • 10,297
  • 11
  • 59
  • 88