るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.111秒)
トップページ > 種類:特異メソッド[x] > クエリ:array[x] > クエリ:new[x] > クラス:JSON::State[x]

別のキーワード

  1. array fill
  2. array []
  3. array sample
  4. array index

ライブラリ

検索結果

JSON::State.new(options = {}) -> JSON::State (18127.0)

自身を初期化します。

...中に現れる JavaScript のオブジェクトの行末に挿入する文字列を指定します。
デフォルトは空文字列です。
: :array_nl
JSON 形式の文字列中に現れる JavaScript の配列の行末に挿入する文字列を指定します。
デフォルトは空文...
...]{
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 # =>...