48件ヒット
[1-48件を表示]
(0.021秒)
検索結果
先頭4件
-
JSON
:: Ext :: Generator :: GeneratorMethods :: Array (24032.0) -
Alias of JSON::Generator::GeneratorMethods::Array
...Alias of JSON::Generator::GeneratorMethods::Array... -
JSON
:: Generator :: GeneratorMethods :: Array (24016.0) -
Array に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...Array に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (9000.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
[1, 2, 3].to_json # => "[1,2,3]"
//} -
JSON
:: State . new(options = {}) -> JSON :: State (24.0) -
自身を初期化します。
...中に現れる JavaScript のオブジェクトの行末に挿入する文字列を指定します。
デフォルトは空文字列です。
: :array_nl
JSON 形式の文字列中に現れる JavaScript の配列の行末に挿入する文字列を指定します。
デフォルトは空文......す。
: :buffer_initial_length
sets the initial length of 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.new(indent: "\t")
copy = JSON::State.new(json_state)
copy.class # => JSON::Ext::Generator::State
copy.indent # => "\t"
//}...