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
0
votes
1 answer

C# Manually Deserialization

I want to know if that's possible to manually parse a serialized binary which has been serialized in c#. My end goal is to parse a serialized binary of a multi-dimensional array which has been serialized in c# and parse it in java, I want to know if…
0
votes
1 answer

BinaryFormatter deserialize delegate field after change in class

Using BinaryFormatter in C#, I am trying to deserialize objects from a class that includes a delegate property. After adding a member on the class referred by the delegate the deserialization breaks. See example below. I would need the…
donquijote
  • 1,642
  • 5
  • 19
  • 41
0
votes
1 answer

ASP.NET Custom Profile Object Fails After Changing to MSBuild Deployment

We have an ASP.NET 2.0 web forms app that used to be deployed via a web deployment project. Recently we deployed a new version built by TFS/MSBuild and the change seems to have caused a problem with the deserialization of a custom profile…
marc
  • 3,248
  • 4
  • 28
  • 33
0
votes
0 answers

Binary Serialization conversion for properties that have types

I have binary serialized objects when that were originally serialized with a property that was DateTime. The property has now changed to DateTimeOffset. The deserialization now throws the exception Object of type 'System.DateTime' cannot be…
ChampChris
  • 1,565
  • 5
  • 26
  • 44
0
votes
1 answer

Serializing a complex object and Deserializing as string for storage - Will it work?

I am using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter to Serialize a complex Project object and store it as a .dat file on the local machine. Then I can deserialize this stream and cast to Project to get an exact copy of the…
jarjar27
  • 117
  • 1
  • 14
0
votes
0 answers

How do java9 compact strings dealing with serialization?

I am quite familiar with java, but somehow serialization was always beyond my responsibilities. Java9 introduced compact strings feature, so characters in strings are always backed into byte[], not char[] array. This is quite good from memory…
Netherwire
  • 2,669
  • 3
  • 31
  • 54
0
votes
2 answers

Serialization/Deserialization without attributes in C#

I have a host of classes including the normal designs of object hierarchies and interfaces, base classes, etc. from a project where I cannot modify any code. I have another payload class in my project which uses composition to encapsulate…
0
votes
1 answer

Binary Protocol Serialization Frameworks

There are some great libraries out there for deserializing binary formats. I really like the declarative approach by kaitai and nom's approach which is using Rust. However, I am not aware of any good approaches to serialize binary formats. For…
user3637203
  • 762
  • 5
  • 17
0
votes
0 answers

2 different namespaces and Binary Serialization

I have 2 different projects with 2 different namespace. When i try to serialize object to file with binary serialization everything is fine until i try to deserialize that object in file from second project. This type of exception is thrown :…
Marekus
  • 31
  • 5
0
votes
2 answers

Binary storage of numbers with overflow bits...how's the format called?

For a serialization/protocol format I have to encode unsigned numbers up to unsigned 64bit integer in a space-saving way that should still be easy to implement (meaning, I'm not looking for a dedicated compression algorithm). I was thinking about…
user601395
  • 13
  • 4
0
votes
2 answers

BinarySerialization, Static and Singleton

After having my class go through binary serialization any references to static instance of another class break. The example should explain better what i mean: using System; using System.Collections.Generic; using System.Linq; using…
0
votes
1 answer

Apache Ignite: Object cannot be found in Hashmap after deserialization

I have a problem with Apache Ignite Serialization/Deserialization related to the order in which fields are deserialized. I need to put an instance of "B" as follow in the Ignite cache: public class A { private final String name; public…
Nicolas
  • 23
  • 1
  • 7
0
votes
1 answer

Optimizing WCF Bandwidth Transfer (Reducing Verbosity)

We are currently using WCF for our transfer between our clients and servers. We are using HttpTransportBinding, with BinaryMessageEncoding. The back end is .NET, and the front end is Xamarin (iOS, Android, Windows 10) and Silverlight. We are looking…
Christian Findlay
  • 6,770
  • 5
  • 51
  • 103
0
votes
1 answer

Cannot get my RSA signature/verifiction on BINARY data to work. Any working examples?

I am trying to use RSA signature and verification on binary data but it is just not working, the RSA.VerifyData always returns false no matter what. Basically I have an object that is binary serialized: public class MyObject { public OtherClass…
0
votes
5 answers

Serializable attribute .NET

I'm using Binary Serialization in .NET to clone objects. Any of my own classes I must mark with the attribute in order for the serializer to process the class. However since this is a function that will be used on any object, I…
Achilles
  • 11,165
  • 9
  • 62
  • 113