Questions tagged [binary-deserialization]

34 questions
7
votes
2 answers

How much does a class/object have to change in order for binary-deserialization to fail

We have a solution where we are storing a fairly large/complex C# object in our database as binary data. My concern is that when changes are made to this class, we run the risk that data saved to the database will fail on deserialization after the…
Ben
  • 2,058
  • 9
  • 29
  • 39
4
votes
2 answers

BinaryFormatter.Deserialize HeaderHandler capture return value

I'm using the BinaryFormatter.Deserialize(Stream, HeaderHandler). I may have missed something obvious here but I can't find any examples online so I'm hoping someone can shed some light. I've passed in my delegate HeaderHandler that returns object…
Sara
  • 612
  • 5
  • 21
4
votes
1 answer

Big files deserializations by protobuf-net

I need to deserialize 1.5GB txt file. I am using protobuf-net from code.google.com/p/protobuf-net/ Sometimes it fails (about 50% cases) with different exceptions (null reference, memory access violation) in different places. I have noticed that if…
3
votes
1 answer

RabbitMQ and Serialization weird error

I have two apps, app1.cs and app2.cs (codes below). In addition I also have a dll I extracted from refer.cs(code below). When I compile app1.cs(which sends a measurement object) I get the following exception: Unhandled Exception:…
Demi
  • 318
  • 1
  • 4
  • 13
3
votes
3 answers

Binary Serialization Namespace Change

I have serialized a class which used to be in namespace Temp, but now I am deserializing inside another namespace (I mean the class which I use to fetch the objects currently resides in another namespace). I am facing the error that the Temp…
Yasser Sobhdel
  • 611
  • 8
  • 26
3
votes
1 answer

Binary Serialization Using Boost and uint8_t

When working with binary data I tend to use uint8_t. I guess that just seems like the type of a byte to me. However, I can't figure out how to get the binary serialization in boost to work with that type. Am I asking the impossible or just missing…
2
votes
1 answer

Force binary deserialization to fail when type modified

I'm looking for a non-intrusive way to enforce deserialization to fail under the following circumstances: The type is not defined in a strongly named assembly. BinaryFormatter is used. Since serialized, the type has been modified (e.g. a property…
rjnilsson
  • 2,343
  • 15
  • 20
2
votes
3 answers

Binary deserializing generic object in C#

I have a generic class which can be serialized: MyOwnGenericClass So I want to deserialize it and if T is a String instance handle it, in another case I want to throw an exception. How to know type of generic contains in MyOwnGenericClass
Pavel
  • 4,912
  • 7
  • 49
  • 69
2
votes
4 answers

What is best way to implement address-albe fields in C++?

I'm trying to implement deserialization where the mapping to field/member is only known at runtime (its complicated). Anyway what I'm trying to do is something like the following: Class A { public: int a; // index 0 float b; // index…
user1867045
  • 85
  • 1
  • 4
2
votes
1 answer

exception : Cannot find the assembly Mynamespace , Version=0.0.0.0, Culture=neutral, PublicKeyToken=null

i try to send Image Object as serialized File from Client to Server by @TCP And get this exception Server Code namespace Receiver { [Serializable()] public class ImageSerial : ISerializable { public Image img = null; public…
Ahmed Samir
  • 53
  • 10
2
votes
1 answer

C# Can't Deserialize DataTable

I have a client/server project and I'm trying to send via socket a DataTable(extracted from a TableAdapter) from server to client. My server namespace is srvCentral and my client is appClient. When I try to deserialize DataTable in client it throws…
1
vote
1 answer

No assembly ID for object type 'ImagePacket'.De Serialization Exception Caught C#

I am Sending Serialized large Image Object over UDP Socket.When I write all received bytes in Memory stream and pass the memory stream object for deserialization it throws an exception No assembly ID for object type 'ImagePacket'. Receiver End…
Samie
  • 83
  • 2
  • 11
1
vote
3 answers

Deserialize binary data in Silverlight 4

I thought I had read somewhere that Silverlight 4 was going to contain a BinaryFormatter to support serializing/deserializing binary data in the client application but I can't seem to locate it, so I'm guessing it's not there. I have an existing…
1
vote
1 answer

Is the main purpose of object serialization in C++ for faster object loading?

I am reading code for a project written by others. The main task of the project is to read contents from a large structured text file (.txt) with 8 columns into a KnowledgeBase object, which have a number of methods and variables. The KnowledgeBase…
marlon
  • 6,029
  • 8
  • 42
  • 76
1
vote
0 answers

What is an elegant way to deserialize array where elements are varied in their types?

I have two files. The first file contains the data schema. The second file contains the data. Data schema describes elements in row +--------------------------+-------------+-------------+...+-------------+-------------+ | Count of elements in row |…
Able Arthy
  • 11
  • 2
1
2 3