るりまサーチ

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

別のキーワード

  1. openssl g
  2. openssl g=
  3. dh g
  4. dsa g
  5. dh g=

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

JSON::State#buffer_initial_length=(length) (6201.0)

This sets the initial length of the buffer to length, if length > 0, otherwise its value isn't changed.

...This sets the initial length of the buffer to length, if length > 0,
otherwise its value isn't changed....

JSON::State#buffer_initial_length -> Integer (6101.0)

This integer returns the current initial length of the buffer.

...This integer returns the current initial length of the buffer....

JSON::State#configure(options = {}) -> self (6101.0)

与えられたハッシュで自身を設定します。

...ーについては JSON::State.new を参照してください。

@param options このオブジェクトの設定をするためのハッシュを指定します。

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

json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "va...
...lue1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"

json_state.configure(indent: " ")
json_state.indent # => " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}

@see JSON::State.new...

JSON::State#generate(obj) -> String (6101.0)

Generates a valid JSON document from object obj and returns the result. If no valid JSON document can be created this method raises a GeneratorError exception.

...
G
enerates a valid JSON document from object obj and returns the
result. If no valid JSON document can be created this method raises a
G
eneratorError exception....

JSON::State#max_nesting -> Integer (6101.0)

生成される JSON 形式の文字列のネストの深さの最大値を返します。

...te = JSON::State.new(max_nesting: 2)
json_state.max_nesting # => 2
JSON.generate([[]], json_state)
JSON.generate([[[]]], json_state) # => JSON::NestingError
//}

//emlist[例 ネストの深さチェックを行わない][ruby]{
require "json"

json_state = JSON::State.new(max_nesting: 0)...
...json_state.max_nesting # => 0
JSON.generate([[[[[[[[[[]]]]]]]]]], json_state)
//}...

絞り込み条件を変える

JSON::State#max_nesting=(depth) (6101.0)

生成される JSON 形式の文字列のネストの深さの最大値をセットします。

...せん。

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

json_state = JSON::State.new(max_nesting: 2)
json_state.max_nesting # => 2
JSON.generate([[]], json_state)
json_state.max_nesting = 3
json_state.max_nesting # => 3
JSON.generate([[[[]]]], json_state) # => JSON::NestingError
//}...

JSON::State#merge(options = {}) -> self (6101.0)

与えられたハッシュで自身を設定します。

...ーについては JSON::State.new を参照してください。

@param options このオブジェクトの設定をするためのハッシュを指定します。

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

json_state = JSON::State.new(indent: "\t")
json_state.indent # => "\t"
JSON.generate({key1: "va...
...lue1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"

json_state.configure(indent: " ")
json_state.indent # => " "
JSON.generate({key1: "value1", key2: "value2"}, json_state)
# => "{ \"key1\":\"value1\", \"key2\":\"value2\"}"
//}

@see JSON::State.new...

JSON::State#array_nl -> String (101.0)

JSON の配列の後に出力する文字列を返します。

...JSON の配列の後に出力する文字列を返します。

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

json_state = JSON::State.new({})
json_state.array_nl # => ""
json_state = JSON::State.new(array_nl: "\n")
json_state.array_nl # => "\n"
//}...

JSON::State#depth -> Integer (101.0)

This integer returns the current depth of data structure nesting.

...This integer returns the current depth of data structure nesting....
<< 1 2 3 > >>