method
to_json
v7.0.0 -
Show latest stable
- Class:
ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString
to_json(*)public
No documentation available.
# File activesupport/lib/active_support/json/encoding.rb, line 55
def to_json(*)
if Encoding.escape_html_entities_in_json
s = super
s.gsub! ESCAPE_REGEX_WITH_HTML_ENTITIES, ESCAPED_CHARS
s
else
s = super
s.gsub! ESCAPE_REGEX_WITHOUT_HTML_ENTITIES, ESCAPED_CHARS
s
end
end