るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils rm_r
  5. fileutils cp_r

ライブラリ

検索結果

<< 1 2 3 > >>

JSON::State#generate(obj) -> String (9202.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
r
esult. If no valid JSON document can be created this method raises a
GeneratorError exception....

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

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

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

//emlist[例][ruby]{
r
equire "json"

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

JSON::State#array_nl=(str) (9102.0)

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

...
J
SON の配列の後に出力する文字列をセットします。

//emlist[例][ruby]{
r
equire "json"

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

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

This integer returns the current initial length of the buffer.

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

JSON::State#buffer_initial_length=(length) (9102.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#check_circular? -> bool (9102.0)

循環参照のチェックを行う場合は、真を返します。 そうでない場合は偽を返します。

...ス][ruby]{
r
equire "json"

a = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
s = JSON.state.new
begin
J
SON.generate(a, s)
r
escue JSON::Ne...
...stingError => e
[e, s.max_nesting, s.check_circular?] # => [#<JSON::NestingError: nesting of 100 is too deep>, 100, true]
end
//}

//emlist[例 ネストをチェックしないケース][ruby]{
r
equire "json"

a = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...
...]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
s2 = JSON.state.new(max_nesting: 0)
j
son = JSON.generate(a, s2)
[json, s2.max_nesting, s2.check_circular?] # => ["[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...

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

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

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

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

//emlist[例][ruby]{
r
equire "json"

j
son_state = JSON::State.new(indent: "\t")
j
son_state.indent # => "\t"
J
SON.generate({key1: "value...
...1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"

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

@see JSON::State.new...

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

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

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

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

//emlist[例][ruby]{
r
equire "json"

j
son_state = JSON::State.new(indent: "\t")
j
son_state.indent # => "\t"
J
SON.generate({key1: "value...
...1", key2: "value2"}, json_state)
# => "{\t\"key1\":\"value1\",\t\"key2\":\"value2\"}"

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

@see JSON::State.new...

JSON::State#quirks_mode -> bool (9102.0)

Returns true, if quirks mode is enabled. Otherwise returns false.

...
R
eturns true, if quirks mode is enabled. Otherwise returns false....

JSON::State#quirks_mode=(enable) (9102.0)

If set to true, enables the quirks_mode mode.

...If set to true, enables the quirks_mode mode....

絞り込み条件を変える

<< 1 2 3 > >>