るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
5件ヒット [1-5件を表示] (0.016秒)

別のキーワード

  1. struct new
  2. mkmf have_struct_member
  3. struct []
  4. struct each
  5. struct select

検索結果

Struct.json_create(hash) -> Struct (63307.0)

JSON のオブジェクトから Ruby のオブジェクトを生成して返します。

...
JSON
のオブジェクトから Ruby のオブジェクトを生成して返します。

@param hash 適切なキーを持つハッシュを指定します。...

Struct#to_json(*args) -> String (63022.0)

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

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

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

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

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

Person = Struct.new(:name, :age)
Person.new("tanaka", 29).to_json # => "{\"json_class\":\"Person\",\"v\":[\"tanaka\",29]}"
//}

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

JSON::CircularDatastructure (18007.0)

JSON 形式の文字列を生成するときに循環するデータ構造があるときに発生する例外です。

...JSON 形式の文字列を生成するときに循環するデータ構造があるときに発生する例外です。...

OpenStruct.json_create(hash) -> OpenStruct (9304.0)

JSON のオブジェクトから OpenStruct のオブジェクトを生成して返します。

...
JSON
のオブジェクトから OpenStruct のオブジェクトを生成して返します。

@param hash OpenStruct.new に指定可能な値をキー 't' もしくは :t に持つハッシュを指定します。...

OpenStruct#to_json(*args) -> String (9004.0)

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

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

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

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

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

絞り込み条件を変える