Skip to main content

Questions tagged [serialization]

Serialization is the process of converting an object into a stream of bytes in order to persist it to memory, a database, or a file. Its main purpose is to save the state of an object in order to be able to recreate it when needed.

Filter by
Sorted by
Tagged with
31 votes
2 answers

Best practices for serialization of DDD aggregates

According to DDD domain logic should not be polluted with technical concerns like serialization, object-relational mapping, etc. So how do you serialize or map the aggregates' state without publicly ...
EagleBeak's user avatar
  • 527
17 votes
2 answers

What happens if we serialize and deserialize two objects which references to each other?

To make it more clear, this is a quick example: class A implements Serializable { public B b; } class B implements Serializable { public A a; } A a = new A(); B b = new B(); a.b = b; b.a = a; So ...
Seregwethrin's user avatar
24 votes
2 answers

Protobuf design patterns

I am evaluating Google Protocol Buffers for a Java based service (but am expecting language agnostic patterns). I have two questions: The first is a broad general question: What patterns are we ...
Apoorv's user avatar
  • 1,128
5 votes
3 answers

Storing object-graphs with class-evolution in Java with transformation (long time archiving)

Abstract A common problem is to store objects (with graph), and to load them back. This is easy as long the stored object representation matches the executing code. But as time goes by, requirements ...
Dag's user avatar
  • 161
4 votes
2 answers

Store conditional expression in database

We have an application that allows users to enter conditionals in the form bound op x op bound2, we store this as a string, and then parse it at runtime to evaluate it. It is a decent amount of work, ...
soandos's user avatar
  • 293
3 votes
1 answer

How to serialize and deserialize lambda expression in F#?

I serialized lambda expressions in C# before. Now I wanna use F# instead of C# for serialization and deserialization. I heard F# is better in this area. Is it true? How can I do that with F#? I’d ...
Zhr Saghaie's user avatar