CallBackery
view release on metacpan or search on metacpan
lib/CallBackery/qooxdoo/callbackery/source/class/callbackery/data/Server.js view on Meta::CPAN
if (cookie) {
impl.setRequestHeader('X-Session-Cookie', cookie);
}
});
this.__client = client;
}
return this.__client;
},
/**
* Recursively replace non-finite numbers (NaN, Infinity) with null in
* plain data so the outgoing JSON is valid. qx.io.jsonrpc serialises
* via qx.util.Serializer.toJson, which emits a literal "NaN"/"Infinity"
* (invalid JSON the server rejects), whereas the legacy transport used
* JSON.stringify, which already mapped these to null. An empty numeric
* form field is the common source of NaN. Dates and qooxdoo objects are
* passed through untouched so the serialiser can handle them.
*
* @param v {var} value to sanitise
* @return {var} json-safe value
*/
_jsonSafe: function(v) {
if (typeof v === 'number') {
return isFinite(v) ? v : null;
}
if (v === null || typeof v !== 'object' || v instanceof Date) {
( run in 0.424 second using v1.01-cache-2.11-cpan-9581c071862 )