This namespace contains a single class: Sys.Serialization.JavaScriptSerializer
.
Sys.Serialization.JavaScriptSerializer
(Figure A-48) provides two static methods for serializing types into JSON formatted data strings and for deserializing JSON formatted data strings into JavaScript types.
Static method that serializes a JavaScript object into a string representation of the corresponding JSON object.
The method returns the string representation of the JSON object representing the JavaScript object.
Date objects are serialized as \/Date(milliseconds from the 1st January 1970)\/
.
Properties that start with $
are skipped.
Non-finite numbers are not serialized. The isFinite()
JavaScript function is used to determine whether a number is finite or not.
Special characters are escaped using a \
and Unicode characters by using \u00
.
Static method that deserializes a JSON object and returns a JavaScript object.