stringify

converts a data object into a string before sending it to server

string stringify(object data);

Parameters

dataobjecta data object

Returns

stringa data string

Example

var str = webix.ajax().stringify({ some: "a" });

Details

The method is called automatically before data is sent to server. If there are dates within the data object, they are formatted with the parseFormatStr method.

If you want to redefine the data serialization for all AJAX calls, you can use:

webix.ajax.prototype.stringify = function(obj){ 
    //or use some custom serializer here
    return JSON.stringify(obj);
}

If you just need a method for object serialization, you may use JSON.stringify directly:

var str = JSON.stringify({ some: "a" });
Back to top