るりまサーチ

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

別のキーワード

  1. json to_json
  2. json state
  3. json parser
  4. json generate
  5. json parse

ライブラリ

クラス

検索結果

JSON::State.from_state(options) -> JSON::State (27544.0)

与えられた options によって生成した JSON::State のインスタンスを返します。

...した JSON::State のインスタンスを返します。

@param options JSON::State のインスタンスか、ハッシュを指定します。

@return options がハッシュである場合は、それによって初期化した JSON::State を
返します。options が JSON::State...
... JSON::State の
インスタンスを返します。

//emlist[例 Hash を指定][ruby]{
r
equire "json"

json
_state = JSON::State.from_state(indent: "\t")
json
_state.class # => JSON::Ext::Generator::State
json
_state.indent # => "\t"
//}

//emlist[例 JSON::State を指定][ruby]{
r
equire...
..."json"

json
_state = JSON::State.from_state(indent: "\t")
# JSON を出力する何らかの処理を実行する
copy = JSON::State.from_state(json_state)
copy.class # => JSON::Ext::Generator::State
copy.indent # => "\t"
//}...