2件ヒット
[1-2件を表示]
(0.043秒)
クラス
-
JSON
:: State (1) - Struct (1)
検索結果
-
JSON
:: State # []=(name , value) (310.0) -
Set the attribute name to value.
Set the attribute name to value. -
Struct
# to _ json(*args) -> String (25.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...