種類
- インスタンスメソッド (187)
- モジュール (88)
- 特異メソッド (77)
- モジュール関数 (44)
クラス
- BigDecimal (11)
- Complex (11)
- DateTime (22)
- Exception (11)
-
JSON
:: State (55) - Rational (11)
- Time (11)
モジュール
- JSON (44)
-
JSON
:: Generator :: GeneratorMethods :: Array (11) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (11) -
JSON
:: Generator :: GeneratorMethods :: Float (11) -
JSON
:: Generator :: GeneratorMethods :: Hash (11) -
JSON
:: Generator :: GeneratorMethods :: Integer (11) -
JSON
:: Generator :: GeneratorMethods :: NilClass (11) -
JSON
:: Generator :: GeneratorMethods :: Object (11) -
JSON
:: Generator :: GeneratorMethods :: String (33) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (11) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (11)
キーワード
- Extend (22)
- Integer (22)
- NilClass (22)
- String (22)
-
buffer
_ initial _ length (11) -
buffer
_ initial _ length= (11) -
check
_ circular? (11) - depth (11)
- generate (11)
-
json
_ create (77) -
max
_ nesting= (11) -
pretty
_ generate (11) -
pretty
_ unparse (11) -
to
_ json (110) -
to
_ json _ raw (11) -
to
_ json _ raw _ object (11) - unparse (11)
検索結果
先頭5件
-
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 # buffer _ initial _ length=(length) (12202.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 (12202.0) -
循環参照のチェックを行う場合は、真を返します。 そうでない場合は偽を返します。
...//emlist[例 ネストをチェックするケース][ruby]{
require "json"
a = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
s = JSON.stat......e.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
:: Ext :: Generator :: GeneratorMethods :: Integer (9002.0) -
Alias of JSON::Generator::GeneratorMethods::Integer
...Alias of JSON::Generator::GeneratorMethods::Integer... -
JSON
:: Ext :: Generator :: GeneratorMethods :: NilClass (9002.0) -
Alias of JSON::Generator::GeneratorMethods::NilClass
...Alias of JSON::Generator::GeneratorMethods::NilClass... -
JSON
:: Ext :: Generator :: GeneratorMethods :: String (9002.0) -
Alias of JSON::Generator::GeneratorMethods::String
...Alias of JSON::Generator::GeneratorMethods::String... -
JSON
:: Generator :: GeneratorMethods :: Integer (9002.0) -
Integer に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...Integer に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: NilClass (9002.0) -
NilClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...NilClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: String (9002.0) -
String に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...String に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: Integer # to _ json(state _ or _ hash = nil) -> String (6202.0) -
自身から生成した JSON 形式の文字列を返します。
...から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
10.to_json # => "10"
//}...