json.encode_invalid_numbers(setting)
json.stringify() may generate an error when encoding floating point numbers not supported by the JSON specification such as Infinity and NaN. This behavior can be changed by calling this function.
json.stringify()