method

to_json

rails latest stable - Class: ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v7.0.0) is shown here.

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