what is serialization all about?

前端 未结 5 1944
梦如初夏
梦如初夏 2020-12-30 14:01

Where exactly does serialization comes into the picture? I read about serializtion on the \'net and I have come to know that

it is an interface that

5条回答
  •  攒了一身酷
    2020-12-30 14:14

    For example when you want to send objects over network or storing them into files.

    Lets say you're creating a Savegame-format for a video-game. You then could make the class Player and every Enemy serializable. This way it would be easy to save the state of the current objects into a file.

    On the other end, when writing a multiplayer-implementation for your game, you could send the Player serialized via network to the other clients, which then could handle these data.

提交回复
热议问题