るりまサーチ

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

別のキーワード

  1. _builtin name
  2. resolv each_name
  3. openssl name
  4. net/imap name
  5. win32ole name

ライブラリ

検索結果

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

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

...成した JSON 形式の文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
...
...定します。

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

person = { "name" => "tanaka", "age" => 19 }
person.to_json # => "{\"name\":\"tanaka\",\"age\":19}"
//}...