Lines Matching defs:toJSON
38 When an object value is found, if the object contains a toJSON
39 method, its toJSON method will be called and the result will be
40 stringified. A toJSON method does not serialize: it returns the
42 or undefined if nothing should be serialized. The toJSON method
48 Date.prototype.toJSON = function (key) {
155 test, toJSON, toString, valueOf
174 if (typeof Date.prototype.toJSON !== 'function') {
176 Date.prototype.toJSON = function () {
188 String.prototype.toJSON =
189 Number.prototype.toJSON =
190 Boolean.prototype.toJSON = function () {
240 // If the value has a toJSON method, call it to obtain a replacement value.
243 typeof value.toJSON === 'function') {
244 value = value.toJSON(key);