638件ヒット
[1-100件を表示]
(0.089秒)
クラス
- BigDecimal (11)
- Class (11)
- Complex (11)
- Date (11)
- DateTime (11)
- Exception (11)
-
JSON
:: Parser (22) -
JSON
:: State (319) - OpenStruct (11)
- Range (11)
- Rational (11)
- Regexp (11)
- Struct (11)
- Symbol (11)
- Time (11)
モジュール
-
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 :: TrueClass (11) - Kernel (33)
キーワード
- JSON (11)
- [] (11)
- []= (11)
-
allow
_ nan? (11) -
array
_ nl (11) -
array
_ nl= (11) -
ascii
_ only? (11) -
buffer
_ initial _ length (11) -
buffer
_ initial _ length= (11) -
check
_ circular? (11) - configure (11)
- depth (11)
- depth= (11)
- generate (11)
- indent (11)
- indent= (11)
- jj (11)
-
json
_ creatable? (11) -
max
_ nesting (11) -
max
_ nesting= (11) - merge (11)
-
object
_ nl (11) -
object
_ nl= (11) - parse (11)
-
quirks
_ mode (11) -
quirks
_ mode= (11) -
quirks
_ mode? (11) - source (11)
- space (11)
- space= (11)
-
space
_ before (11) -
space
_ before= (11) -
to
_ h (11) -
to
_ hash (11) -
to
_ json (231) -
to
_ json _ raw (11) -
to
_ json _ raw _ object (11)
検索結果
先頭5件
- Kernel
# j(*objects) -> nil - JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String - JSON
:: Generator :: GeneratorMethods :: FalseClass # to _ json(state _ or _ hash = nil) -> String - JSON
:: Generator :: GeneratorMethods :: Float # to _ json(state _ or _ hash = nil) -> String - JSON
:: Generator :: GeneratorMethods :: Hash # to _ json(state _ or _ hash = nil) -> String
-
Kernel
# j(*objects) -> nil (21210.0) -
与えられたオブジェクトを JSON 形式の文字列で標準出力に一行で出力します。
...トを JSON 形式の文字列で標準出力に一行で出力します。
@param objects JSON 形式で出力したいオブジェクトを指定します。
//emlist[例][ruby]{
require "json"
j([1,2,{"name" => "tanaka","age" => 19}])
# => [1,2,{"name":"tanaka","age":19}]
//}
@see Kernel.#p... -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (15203.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 # to _ json(state _ or _ hash = nil) -> String (15203.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 # to _ json(state _ or _ hash = nil) -> String (15203.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 # to _ json(state _ or _ hash = nil) -> String (15203.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 # to _ json(state _ or _ hash = nil) -> String (15203.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 # to _ json(state _ or _ hash = nil) -> String (15203.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 # to _ json(state _ or _ hash = nil) -> String (15203.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, age)
@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
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (15203.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_jso......n # => "\\"
puts "𤘩宮城".to_json(ascii_only: true) # => "\ud851\ude29\u5bae\u57ce"
//}... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw -> String (15203.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...