るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

JSON::State#depth=(depth) (6202.0)

This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.

...
T
his sets the maximum level of data structure nesting in the generated
JSON to the integer depth, max_nesting = 0 if no maximum should be
checked....

JSON::State#indent -> String (6126.0)

インデントに使用する文字列を返します。

...インデントに使用する文字列を返します。

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

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

JSON::State#indent=(string) (6126.0)

インデントに使用する文字列をセットします。

...string インデントに使用する文字列を指定します。

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

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

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

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

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

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

This integer returns the current initial length of the buffer.

...
T
his integer returns the current initial length of the buffer....

絞り込み条件を変える

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

This integer returns the current depth of data structure nesting.

...
T
his integer returns the current depth of data structure nesting....

JSON::State#generate(obj) -> String (6102.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.

...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....

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

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

...ません。

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

json_state = 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) (6102.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
//}...
<< 1 2 3 ... > >>