script serialization code example
Example 1: get serialize data javascript
// HTML
// JS
function clickMe(){
let myForm = document.getElementById('myForm');
let formData = new FormData(myForm);
console.log(formData.get('username'));
}
Example 2: what is serialization
Serialization; when we MAP a Java object to API JSON
format (CONVERT JAVA OBJECT TO JSON);
Deserialization; API JSON/XML ^ MAP it to Java Object
(JSON TO JAVA OBJECT)