What is Serialize and Deserialize for?

Asked

Viewed 1,925 times

0

My question is what’s the point Serialize and Deserialize in C#. I have an API and am having some problems with this issue so I want to understand better.

  • Your question is unclear, edit and explain better, which API are you using? What is this "Serialize" and "Deserialize" within this API? Are these methods? We need more information to help.

2 answers

1

Serialize is the process of transforming an object into a stream of bytes! An example is to take a List<> and turn it into a JSON to manipulate somewhere and then turn it into a List again.

1


With Serialize, Voce creates a series of data, for example a JSON.

You can serialize a List list in a JSON to return to a page and fill a data grid via javascript, for example.

The same goes for the other side, which "deserializes" a JSON for a list

  • It is common to do this process of deserialization when doing a post in the API?

  • 1

    I don’t know if it’s common to do this process... Being an independent developer, I don’t have much contact with other Devs and I have adopted some working methods of my own, however in my opinion it is the simplest to deal with data coming from a JSON. .

Browser other questions tagged

You are not signed in. Login or sign up in order to post.