別のキーワード
種類
- モジュール (20)
- インスタンスメソッド (13)
- 特異メソッド (1)
クラス
-
JSON
:: State (2)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: Array (1) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (1) -
JSON
:: Generator :: GeneratorMethods :: Float (1) -
JSON
:: Generator :: GeneratorMethods :: Hash (1) -
JSON
:: Generator :: GeneratorMethods :: Integer (1) -
JSON
:: Generator :: GeneratorMethods :: NilClass (1) -
JSON
:: Generator :: GeneratorMethods :: Object (1) -
JSON
:: Generator :: GeneratorMethods :: String (3) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (1) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (1)
キーワード
- Array (2)
- Extend (2)
- FalseClass (2)
- Float (2)
- Hash (2)
- Integer (2)
- NilClass (2)
- Object (2)
- String (2)
- TrueClass (2)
- [] (1)
- generate (1)
-
json
_ create (1) -
to
_ json (9) -
to
_ json _ raw (1) -
to
_ json _ raw _ object (1)
検索結果
先頭5件
-
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (9025.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...した結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生成する JSON 形式の文字......をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, ag......e)
@name, @age = name, age
end
end
tanaka = Person.new("tanaka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::GeneratorMethods::Object
//}... -
JSON
:: Ext :: Generator :: GeneratorMethods :: Array (9007.0) -
Alias of JSON::Generator::GeneratorMethods::Array
...Alias of JSON::Generator::GeneratorMethods::Array... -
JSON
:: Ext :: Generator :: GeneratorMethods :: FalseClass (9007.0) -
Alias of JSON::Generator::GeneratorMethods::FalseClass
...Alias of JSON::Generator::GeneratorMethods::FalseClass... -
JSON
:: Ext :: Generator :: GeneratorMethods :: Float (9007.0) -
Alias of JSON::Generator::GeneratorMethods::Float
...Alias of JSON::Generator::GeneratorMethods::Float... -
JSON
:: Ext :: Generator :: GeneratorMethods :: Hash (9007.0) -
Alias of JSON::Generator::GeneratorMethods::Hash
...Alias of JSON::Generator::GeneratorMethods::Hash... -
JSON
:: Ext :: Generator :: GeneratorMethods :: Integer (9007.0) -
Alias of JSON::Generator::GeneratorMethods::Integer
...Alias of JSON::Generator::GeneratorMethods::Integer... -
JSON
:: Ext :: Generator :: GeneratorMethods :: NilClass (9007.0) -
Alias of JSON::Generator::GeneratorMethods::NilClass
...Alias of JSON::Generator::GeneratorMethods::NilClass... -
JSON
:: Ext :: Generator :: GeneratorMethods :: Object (9007.0) -
Alias of JSON::Generator::GeneratorMethods::Object
...Alias of JSON::Generator::GeneratorMethods::Object... -
JSON
:: Ext :: Generator :: GeneratorMethods :: String (9007.0) -
Alias of JSON::Generator::GeneratorMethods::String
...Alias of JSON::Generator::GeneratorMethods::String... -
JSON
:: Ext :: Generator :: GeneratorMethods :: String :: Extend (9007.0) -
Alias of JSON::Generator::GeneratorMethods::String::Extend
...Alias of JSON::Generator::GeneratorMethods::String::Extend... -
JSON
:: Ext :: Generator :: GeneratorMethods :: TrueClass (9007.0) -
Alias of JSON::Generator::GeneratorMethods::TrueClass
...Alias of JSON::Generator::GeneratorMethods::TrueClass... -
JSON
:: Generator :: GeneratorMethods :: Array (9007.0) -
Array に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...Array に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (9007.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 :: FalseClass (9007.0) -
FalseClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...FalseClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String (9007.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 (9007.0) -
Float に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...Float に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: Float # to _ json(state _ or _ hash = nil) -> String (9007.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 :: Hash (9007.0) -
Hash に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...Hash に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: Hash # to _ json(state _ or _ hash = nil) -> String (9007.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 (9007.0) -
Integer に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...Integer に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: Integer # to _ json(state _ or _ hash = nil) -> String (9007.0) -
自身から生成した JSON 形式の文字列を返します。
...自身から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
10.to_json # => "10"
//}... -
JSON
:: Generator :: GeneratorMethods :: NilClass (9007.0) -
NilClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...NilClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: NilClass # to _ json(state _ or _ hash = nil) -> String (9007.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 :: Object (9007.0) -
Object に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...Object に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: String (9007.0) -
String に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...String に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (9007.0) -
自身から生成した JSON 形式の文字列を返します。
...ら生成した JSON 形式の文字列を返します。
自身のエンコードは UTF-8 であるべきです。
"\u????" のように UTF-16 ビッグエンディアンでエンコードされた文字列を返すことがあります。
@param state_or_hash 生成する JSON 形式の文字......に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
puts "test".to_json # => "test"
puts '"'.to_json #......=> "\""
puts "\\".to_json # => "\\"
puts "𤘩宮城".to_json(ascii_only: true) # => "\ud851\ude29\u5bae\u57ce"
//}... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw -> String (9007.0) -
自身に対して JSON::Generator::GeneratorMethods::String#to_json_raw_object を呼び出して JSON::Generator::GeneratorMethods::Hash#to_json した結果を返します。
...自身に対して JSON::Generator::GeneratorMethods::String#to_json_raw_object を呼び出して JSON::Generator::GeneratorMethods::Hash#to_json した結果を返します。
@see JSON::Generator::GeneratorMethods::String#to_json_raw_object, JSON::Generator::GeneratorMethods::Hash#to_json... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw _ object -> Hash (9007.0) -
生の文字列を格納したハッシュを生成します。
... JSON に変換する場合に使用してください。
require 'json'
"にほんご".encode("euc-jp").to_json_raw_object
# => {"json_class"=>"String", "raw"=>[164, 203, 164, 219, 164, 243, 164, 180]}
"にほんご".encode("euc-jp").to_json # source sequence is illegal/malformed (JSON::Ge... -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (9007.0) -
String に JSON で使用する特異メソッドを追加するためのモジュールです。
...String に JSON で使用する特異メソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: String :: Extend . json _ create(hash) -> String (9007.0) -
JSON のオブジェクトから Ruby の文字列を生成して返します。
...
JSON のオブジェクトから Ruby の文字列を生成して返します。
@param hash キーとして "raw" という文字列を持ち、その値として数値の配列を持つハッシュを指定します。
require 'json'
String.json_create({"raw" => [0x41, 0x42, 0x43]}) # => "A... -
JSON
:: Generator :: GeneratorMethods :: TrueClass (9007.0) -
TrueClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...TrueClass に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: TrueClass # to _ json(state _ or _ hash = nil) -> String (9007.0) -
自身から生成した JSON 形式の文字列を返します。
...ら生成した JSON 形式の文字列を返します。
"true" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の......引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
true.to_json # => "true"
//}... -
JSON
:: State # [](name) -> object (55.0) -
Return the value returned by method name.
Return the value returned by method name. -
JSON
:: State # generate(obj) -> String (55.0) -
Generates a valid JSON document from object obj and returns the result. If no valid JSON document can be created this method raises a GeneratorError exception.
...Generates a valid JSON document from object obj and returns the
result. If no valid JSON document can be created this method raises a
GeneratorError exception....