るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. fileutils options_of
  2. _builtin of
  3. objspace memsize_of
  4. objspace memsize_of_all
  5. rake kind_of?

クラス

モジュール

キーワード

検索結果

JSON::Ext::Generator::GeneratorMethods::Array (55.0)

Alias of JSON::Generator::GeneratorMethods::Array

...Alias of JSON::Generator::GeneratorMethods::Array...

JSON::Ext::Generator::GeneratorMethods::FalseClass (55.0)

Alias of JSON::Generator::GeneratorMethods::FalseClass

...Alias of JSON::Generator::GeneratorMethods::FalseClass...

JSON::Ext::Generator::GeneratorMethods::Float (55.0)

Alias of JSON::Generator::GeneratorMethods::Float

...Alias of JSON::Generator::GeneratorMethods::Float...

JSON::Ext::Generator::GeneratorMethods::Hash (55.0)

Alias of JSON::Generator::GeneratorMethods::Hash

...Alias of JSON::Generator::GeneratorMethods::Hash...

JSON::Ext::Generator::GeneratorMethods::Integer (55.0)

Alias of JSON::Generator::GeneratorMethods::Integer

...Alias of JSON::Generator::GeneratorMethods::Integer...

絞り込み条件を変える

JSON::Ext::Generator::GeneratorMethods::NilClass (55.0)

Alias of JSON::Generator::GeneratorMethods::NilClass

...Alias of JSON::Generator::GeneratorMethods::NilClass...

JSON::Ext::Generator::GeneratorMethods::Object (55.0)

Alias of JSON::Generator::GeneratorMethods::Object

...Alias of JSON::Generator::GeneratorMethods::Object...

JSON::Ext::Generator::GeneratorMethods::String (55.0)

Alias of JSON::Generator::GeneratorMethods::String

...Alias of JSON::Generator::GeneratorMethods::String...

JSON::Ext::Generator::GeneratorMethods::String::Extend (55.0)

Alias of JSON::Generator::GeneratorMethods::String::Extend

...Alias of JSON::Generator::GeneratorMethods::String::Extend...

JSON::Ext::Generator::GeneratorMethods::TrueClass (55.0)

Alias of JSON::Generator::GeneratorMethods::TrueClass

...Alias of JSON::Generator::GeneratorMethods::TrueClass...

絞り込み条件を変える

JSON::Ext::Generator::State (55.0)

Alias of JSON::State

...Alias of JSON::State...

JSON::Ext::Parser (55.0)

Alias of JSON::Parser

...Alias of JSON::Parser...

JSON::State#buffer_initial_length -> Integer (55.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) (55.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#depth -> Integer (55.0)

This integer returns the current depth of data structure nesting.

This integer returns the current depth of data structure nesting.

絞り込み条件を変える

JSON::State#depth=(depth) (55.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.

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

JSON::UnparserError (55.0)

Alias of JSON::GeneratorError

...Alias of JSON::GeneratorError...

JSON.#generate(object, state = nil) -> String (43.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...オブジェクトを一行の JSON 形式の文字列に変換して返します。

デフォルトでは、サイズが最小となる JSON 形式の文字列を生成します。
また、循環参照のチェックを行います。JSON::NaN, JSON::Infinity,
JSON
::MinusInfinity を生成する...
...こともありません。

unparse は将来削除される予定です。

@param object JSON 形式の文字列に変換するオブジェクトを指定します。

@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定で...
...tring that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指定した場合、生成するオブジェクトの循環...

JSON.#unparse(object, state = nil) -> String (43.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...オブジェクトを一行の JSON 形式の文字列に変換して返します。

デフォルトでは、サイズが最小となる JSON 形式の文字列を生成します。
また、循環参照のチェックを行います。JSON::NaN, JSON::Infinity,
JSON
::MinusInfinity を生成する...
...こともありません。

unparse は将来削除される予定です。

@param object JSON 形式の文字列に変換するオブジェクトを指定します。

@param state JSON::State または、to_hash や to_h メソッドでハッシュに変換可能なオブジェクトを指定で...
...tring that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default: '')
: :check_circular
真を指定した場合、生成するオブジェクトの循環...

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

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

...y]{
require "json"

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

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

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

絞り込み条件を変える

JSON::State.new(options = {}) -> JSON::State (25.0)

自身を初期化します。

...字列を指定します。デフォルトは空文字列です。
: :space
JSON
形式の文字列のトークン間に挿入する文字列を指定します。デフォルトは空文字列です。
: :space_before
JSON
形式の文字列中で JavaScript のオブジェクトを表す部分...
...。デフォルトは空文字列です。
: :object_nl
JSON
形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を指定します。
デフォルトは空文字列です。
: :array_nl
JSON
形式の文字列中に現れる JavaScript の配列...
...ジェクトの循環をチェックします。
この動作がデフォルトです。
: :allow_nan
真を指定した場合、JSON::NaN, JSON::Infinity,
JSON
::MinusInfinity を生成することを許すようになります。
偽を指定した場合、これらの値を生成しよう...

DateTime#to_json(*args) -> String (22.0)

自身を JSON 形式の文字列に変換して返します。

...自身を JSON 形式の文字列に変換して返します。

内部的にはハッシュにデータをセットしてから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。

@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡...
...されます。

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

DateTime.now.to_json
# => "{\"json_class\":\"DateTime\",\"y\":2018,\"m\":12,\"d\":10,\"H\":1,\"M\":28,\"S\":57,\"of\":\"3/8\",\"sg\":2299161.0}"
//}

@see JSON::Generator::GeneratorMethods::Hash#to_json...