class ActiveSupport::JSON::Encoding::JSONGemEncoder
def encode(value)
Experimental RBS support (using type sampling data from the type_fusion
project).
def encode: (Hash value) -> String
This signature was generated using 2 samples from 1 application.
def encode(value) unless options.empty? value = value.as_json(options.dup) end json = stringify(jsonify(value)) # Rails does more escaping than the JSON gem natively does (we # escape \u2028 and \u2029 and optionally >, <, & to work around # certain browser problems). if Encoding.escape_html_entities_in_json json.gsub!(">", '\u003e') json.gsub!("<", '\u003c') json.gsub!("&", '\u0026') end json.gsub!("\u2028", '\u2028') json.gsub!("\u2029", '\u2029') json end