462件ヒット
[1-100件を表示]
(0.039秒)
種類
- インスタンスメソッド (330)
- モジュール関数 (77)
- 特異メソッド (44)
- 定数 (11)
クラス
- BigDecimal (11)
- Complex (11)
- Date (11)
- DateTime (11)
- Exception (11)
-
JSON
:: Parser (11) -
JSON
:: State (66) - OpenStruct (22)
- Range (11)
- Rational (11)
- Regexp (11)
- Struct (22)
- Symbol (11)
- Time (11)
モジュール
- JSON (99)
-
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 :: String :: Extend (11) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (11)
キーワード
- VERSION (11)
-
array
_ nl (11) -
create
_ id (11) - dump (11)
-
fast
_ generate (11) -
fast
_ unparse (11) - generate (22)
- indent (11)
-
json
_ create (33) -
object
_ nl (11) -
pretty
_ generate (11) -
pretty
_ unparse (11) - source (11)
- space (11)
-
space
_ before (11) -
to
_ json (231) -
to
_ json _ raw (11) -
to
_ json _ raw _ object (11) - unparse (11)
検索結果
先頭5件
- JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String - JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw -> String - JSON
:: Generator :: GeneratorMethods :: String :: Extend . json _ create(hash) -> String - JSON
:: Generator :: GeneratorMethods :: TrueClass # to _ json(state _ or _ hash = nil) -> String - OpenStruct
# to _ json(*args) -> String
-
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (3214.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 (3202.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 :: Extend . json _ create(hash) -> String (3202.0) -
JSON のオブジェクトから Ruby の文字列を生成して返します。
...
JSON のオブジェクトから Ruby の文字列を生成して返します。
@param hash キーとして "raw" という文字列を持ち、その値として数値の配列を持つハッシュを指定します。
require 'json'
String.json_create({"raw" => [0x41, 0x42, 0x43]}) # => "A... -
JSON
:: Generator :: GeneratorMethods :: TrueClass # to _ json(state _ or _ hash = nil) -> String (3202.0) -
自身から生成した JSON 形式の文字列を返します。
...ら生成した JSON 形式の文字列を返します。
"true" という文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の......引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
true.to_json # => "true"
//}... -
OpenStruct
# to _ json(*args) -> String (3201.0) -
自身を JSON 形式の文字列に変換して返します。
...自身を JSON 形式の文字列に変換して返します。
内部的にはハッシュにデータをセットしてから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡......されます。
@see JSON::Generator::GeneratorMethods::Hash#to_json... -
OpenStruct
. json _ create(hash) -> OpenStruct (3201.0) -
JSON のオブジェクトから OpenStruct のオブジェクトを生成して返します。
...
JSON のオブジェクトから OpenStruct のオブジェクトを生成して返します。
@param hash OpenStruct.new に指定可能な値をキー 't' もしくは :t に持つハッシュを指定します。... -
Struct
# to _ json(*args) -> String (3201.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... -
Struct
. json _ create(hash) -> Struct (3201.0) -
JSON のオブジェクトから Ruby のオブジェクトを生成して返します。
...
JSON のオブジェクトから Ruby のオブジェクトを生成して返します。
@param hash 適切なキーを持つハッシュを指定します。... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw _ object -> Hash (3120.0) -
生の文字列を格納したハッシュを生成します。
...TF-8 の文字列ではなく生の文字列を 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::GeneratorError)... -
JSON
. # dump(object , io = nil , limit = nil) -> String | IO (202.0) -
与えられたオブジェクトを JSON 形式の文字列に変換してダンプします。
...与えられたオブジェクトを JSON 形式の文字列に変換してダンプします。
与えられたオブジェクトを引数として JSON.#generate を呼び出します。
@param object ダンプするオブジェクトを指定します。
@param io IO のように write メ......//emlist[例][ruby]{
require "json"
JSON.dump({ name: "tanaka", age: 19 }) # => "{\"name\":\"tanaka\",\"age\":19}"
//}
//emlist[例][ruby]{
require "json"
File.open("test.txt", "w") do |f|
JSON.dump([[[[[[[[[[]]]]]]]]]], f, 10) # => #<File:test.txt>
JSON.dump([[[[[[[[[[[]]]]]]]]]]], f, 10...