converts a data object into a string before sending it to server
data | object | a data object |
string | a data string |
var str = webix.ajax().stringify({ some: "a" });
The method is called automatically before data are sent to server. If there are dates (Date objects) in the data object, they are formatted with the parseFormatStr method.
If you want to redefine the data serialization for all AJAX calls, you can redifine serialize():
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