るりまサーチ

最速Rubyリファレンスマニュアル検索!
220件ヒット [1-100件を表示] (0.103秒)
トップページ > クエリ:l[x] > クエリ:>[x] > クエリ:h[x] > ライブラリ:json[x]

別のキーワード

  1. matrix l
  2. kernel $-l
  3. _builtin $-l
  4. lupdecomposition l
  5. l

検索結果

<< 1 2 3 > >>

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

This integer returns the current initial length of the buffer.

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

JSON::State#check_circular? -> bool (12302.0)

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

...//emlist[例 ネストをチェックするケース][ruby]{
require "json"

a = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
s = JSON.sta...
...te.new
begin
JSON
.generate(a, s)
rescue JSON::NestingError => e
[e, s.max_nesting, s.check_circular?] # => [#<JSON::NestingError: nesting of 100 is too deep>, 100, true]
end
//}

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

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

JSON::State#buffer_initial_length=(length) (12218.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::Generator::GeneratorMethods::FalseClass#to_json(state_or_hash = nil) -> String (6302.0)

自身から生成した JSON 形式の文字列を返します。

...ら生成した JSON 形式の文字列を返します。

"false" という文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
JSON::State のインスタンスか、
JSON
::State.new...
...の引数と同じ Hash
指定します。

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

false.to_json # => "false"
//}...

JSON::Generator::GeneratorMethods::Float#to_json(state_or_hash = nil) -> String (6302.0)

自身から生成した JSON 形式の文字列を返します。

...から生成した JSON 形式の文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
JSON::State のインスタンスか、
JSON
::State.new の引数と同じ Hash...
...指定します。

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

(1.0).to_json # => "1.0"
//}...

絞り込み条件を変える

JSON::Generator::GeneratorMethods::NilClass#to_json(state_or_hash = nil) -> String (6302.0)

自身から生成した JSON 形式の文字列を返します。

...ら生成した JSON 形式の文字列を返します。

"null" という文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
JSON::State のインスタンスか、
JSON
::State.new の...
...引数と同じ Hash
指定します。

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

nil.to_json # => "null"
//}...

JSON::Generator::GeneratorMethods::TrueClass#to_json(state_or_hash = nil) -> String (6302.0)

自身から生成した JSON 形式の文字列を返します。

...ら生成した JSON 形式の文字列を返します。

"true" という文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
JSON::State のインスタンスか、
JSON
::State.new の...
...引数と同じ Hash
指定します。

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

true.to_json # => "true"
//}...

JSON::Generator::GeneratorMethods::Array#to_json(state_or_hash = nil) -> String (3302.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::Generator::GeneratorMethods::Hash#to_json(state_or_hash = nil) -> String (3302.0)

自身から生成した JSON 形式の文字列を返します。

...から生成した JSON 形式の文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
JSON::State のインスタンスか、
JSON
::State.new の引数と同じ Hash...
...指定します。

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

person = { "name" => "tanaka", "age" => 19 }
person.to_json # => "{\"name\":\"tanaka\",\"age\":19}"
//}...

JSON::Generator::GeneratorMethods::Integer#to_json(state_or_hash = nil) -> String (3302.0)

自身から生成した JSON 形式の文字列を返します。

...から生成した JSON 形式の文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
JSON::State のインスタンスか、
JSON
::State.new の引数と同じ Hash...
...指定します。

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

10.to_json # => "10"
//}...

絞り込み条件を変える

<< 1 2 3 > >>