Class | String |
In: |
lib/json.rb
|
Parent: | Object |
This string should be encoded with UTF-8 (if JSON unicode support is enabled). A call to this method returns a JSON string encoded with UTF16 big endian characters as \u????. If JSON.support_unicode? is false only control characters are encoded this way, all 8-bit bytes are just passed through.
# File lib/json.rb, line 637 637: def to_json(*) 638: '"' << JSON::utf8_to_json(self) << '"' 639: end