33件ヒット
[1-33件を表示]
(0.094秒)
検索結果
先頭3件
-
JSON
. state -> JSON :: Ext :: Generator :: State (18422.0) -
JSON ライブラリがジェネレータの状態を表すクラスとして使用するクラスを返します。
...JSON ライブラリがジェネレータの状態を表すクラスとして使用するクラスを返します。
//emlist[例][ruby]{
require "json"
JSON.state # => JSON::Ext::Generator::State
//}... -
JSON
:: State . from _ state(options) -> JSON :: State (9439.0) -
与えられた options によって生成した JSON::State のインスタンスを返します。
...JSON::State のインスタンスを返します。
@param options JSON::State のインスタンスか、ハッシュを指定します。
@return options がハッシュである場合は、それによって初期化した JSON::State を
返します。options が JSON::State のイ......いない JSON::State の
インスタンスを返します。
//emlist[例 Hash を指定][ruby]{
require "json"
json_state = JSON::State.from_state(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}
//emlist[例 JSON::State を指定][ruby]{......require "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"
//}... -
JSON
:: State . new(options = {}) -> JSON :: State (3286.0) -
自身を初期化します。
...the generator's internal buffer.
//emlist[例 Hash を指定][ruby]{
require "json"
json_state = JSON::State.new(indent: "\t")
json_state.class # => JSON::Ext::Generator::State
json_state.indent # => "\t"
//}
//emlist[例 JSON::State を指定][ruby]{
require "json"
json_state = JSON::State.ne......w(indent: "\t")
copy = JSON::State.new(json_state)
copy.class # => JSON::Ext::Generator::State
copy.indent # => "\t"
//}...