as_json(options = nil)
public
Encoding Infinity or NaN to JSON should return “null”.
The default returns “Infinity” or “NaN” which are not valid JSON.
# File activesupport/lib/active_support/core_ext/object/json.rb, line 100
def as_json(options = nil) #:nodoc:
finite? ? self : nil
end