るりまサーチ

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

ライブラリ

検索結果

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

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

...::State.new の引数と同じ Hash を
指定します。

//emlist[例][ruby]{
require "json"

puts "test".to_json # => "test"
puts '"'.to_json # => "\""
puts "\\".to_json # => "\\"
puts "𤘩宮城".to_json(ascii_o...