Serialized object:
Object serialization: The state of an object is converted to a string, or a string can be restored to an object. Method: Json.stringify (), used to serialize, Json.parse (), to restore the object.
JSON (JavaScript Object Notation), which is the JavaScript objects notation.
var o = {x:1};
var s = json.stringify (o); S is a deep copy of O
var p = json.parse (s); P is a deep copy of S
Object method:
1,tostring ()//String that returns the value of the object. The default ToString () method does not output much useful information, and many classes have a custom ToString () method
2,tolocalstring ()//returns the localized string for this object
The 3,tojson ()///With serialization method calls the ToJSON () method. If called, the return value is the result of serialization
4,valueof ()///When JS needs to convert an object to a primitive value before calling. Especially when converting to a number.
JavaScript Object (c)