2

I am curious to know what happens when we de-serialize an object.

For example if my class object is composed of many other objects, how does the object creation process takes place in De-serialization process

Dharman
  • 30,962
  • 25
  • 85
  • 135
daydreamer
  • 87,243
  • 191
  • 450
  • 722

1 Answers1

1

Objects are created with default initialized fields and then populated with attribute values taken from the serial stream. The object creation is done by runtime system "magic" rather than a declared (or implicit) constructor.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216