Method: MIME::Type#to_json

Defined in:
lib/mime/type.rb

#to_json(*args) ⇒ Object

Converts the MIME::Type to a JSON string.



544
545
546
547
# File 'lib/mime/type.rb', line 544

def to_json(*args)
  require "json"
  to_h.to_json(*args)
end