るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.127秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:ASCII[x] > モジュール:JSON::Generator::GeneratorMethods::String[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

検索結果

JSON::Generator::GeneratorMethods::String#to_json(state_or_hash = nil) -> String (6219.0)

自身から生成した JSON 形式の文字列を返します。

...の文字列を返します。

自身のエンコードは UTF-8 であるべきです。
"\u????" のように UTF-16 ビッグエンディアンでエンコードされた文字列を返すことがあります。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズす...
...指定します。

//emlist[例][ruby]{
r
equire "json"

puts "test".to_json # => "test"
puts '"'.to_json # => "\""
puts "\\".to_json # => "\\"
puts "𤘩宮城".to_json(ascii_only: true) # => "\ud851\ude29\u5bae\u57ce"
//}...