-2

Here is what i understand about serialization:

It lets you take your object and turn it into a stream of bytes so you can save it to a flat file for later use.

I would like to know what what benefit this would serve and why would anyone want to do this.

Greg Giacovelli
  • 10,164
  • 2
  • 47
  • 64

1 Answers1

4

This is a very general question - you would serialize an object into bytes for any number of reasons.

  • Transfer an object across the internet to another program
  • Save an object to a database or file system so you can restore your programs state at a later date or time
  • Save an object for the sake of undo/redo within your program

There are many other reasons as well, of course, but you can get the idea from these! I recommend searching online to see if serialization is useful for your application.

drew_w
  • 10,320
  • 4
  • 28
  • 49