You need to sign in to do that
Don't have an account?
KGDev
Why serialize?
Could someone please explain me why do we want to serialize/de-serialize data? What is the idea behind it? What are good resources that explains the concept? I looked at the official salesforce documentation but it just gives examples but not the "why"?
Thank You!
Thank You!
We serialize/de-serialize data when we want to convert all the content of an object into a string for instance.
This string value of a serialization can be stored into a unique text field or sended/received with a webservice.
We used the serialization to compare deeply and quickly a complex object by comparing just the complete serialized values.
The other common use is for the webservices with Json messages.
These methods enable you to serialize objects into JSON-formatted strings and to deserialize JSON strings back into objects.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_json_json.htm
All Answers
We serialize/de-serialize data when we want to convert all the content of an object into a string for instance.
This string value of a serialization can be stored into a unique text field or sended/received with a webservice.
We used the serialization to compare deeply and quickly a complex object by comparing just the complete serialized values.
The other common use is for the webservices with Json messages.
These methods enable you to serialize objects into JSON-formatted strings and to deserialize JSON strings back into objects.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_json_json.htm