class Date

def to_json(*args)


{"json_class":"Date","y":2023,"m":11,"d":21,"sg":2299161.0}

Output:

puts Date.today.to_json
require 'json/add/date'

Returns a JSON string representing +self+:
def to_json(*args)
  as_json.to_json(*args)
end