class JSON::TruffleRuby::Generator::State

def fast_serialize_string(string, buf) # :nodoc:

:nodoc:
Assumes !@ascii_only, !@script_safe
def fast_serialize_string(string, buf) # :nodoc:
 '"'
 string.encoding == ::Encoding::UTF_8
n
ring = string.encode(::Encoding::UTF_8)
ue Encoding::UndefinedConversionError => error
ise GeneratorError, error.message
GeneratorError, "source sequence is illegal/malformed utf-8" unless string.valid_encoding?
\\\x0-\x1f]/n.match?(string)
<< string.gsub(/["\\\x0-\x1f]/n, MAP)
<< string
 '"'