src/aria/utils/Json.js
function (item, options, serializerInstance) {
                if (serializerInstance) {
                    if ("serialize" in serializerInstance) {
                        return serializerInstance.serialize(item, options);
                    } else {
                        this.$logError(this.INVALID_JSON_SERIALIZER_INSTANCE);
                        return null;
                    }
                }

                return this.__defaultJsonSerializer.serialize(item, options);
            }
function (item, options, serializerInstance) {
                if (serializerInstance) {
                    if ("serialize" in serializerInstance) {
                        return serializerInstance.serialize(item, options);
                    } else {
                        this.$logError(this.INVALID_JSON_SERIALIZER_INSTANCE);
                        return null;
                    }
                }

                return this.__defaultJsonSerializer.serialize(item, options);
            }
function ( item , options , serializerInstance ) { if ( serializerInstance ) { if ( "serialize" in serializerInstance ) { return serializerInstance . serialize ( item , options ) ; } else { this . $logError ( this . INVALID_JSON_SERIALIZER_INSTANCE ) ; return null ; } } return this . __defaultJsonSerializer . serialize ( item , options ) ; }
Converts an object to a JSON string
@param {Object|Array|String|Number|Boolean|Date|RegExp|Function} item item to serialize
@param {Object} options options for the serialize method of the serializer - optional
@param {Object} serializerInstance instance of a serializer - optional. If not provided, an instance of
the default serializer (aria.utils.json.JsonSerializer) is used. If the provided instance does not have a
serialize method, an error is raised
@return {String} the JSON string. null if the JSON serialization failed
Converts an object to a JSON string