るりまサーチ

最速Rubyリファレンスマニュアル検索!
143件ヒット [1-100件を表示] (0.090秒)
トップページ > クエリ:l[x] > クエリ:Hash[x] > クエリ:to_json[x]

別のキーワード

  1. _builtin hash
  2. hash []
  3. dbm to_hash
  4. _builtin to_hash
  5. matrix hash

検索結果

<< 1 2 > >>

JSON::Generator::GeneratorMethods::FalseClass#to_json(state_or_hash = nil) -> String (21320.0)

自身から生成した 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 (21320.0)

自身から生成した JSON 形式の文字列を返します。

...r_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash
指定します。

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

(1.0).to_json #...

JSON::Generator::GeneratorMethods::Hash#to_json(state_or_hash = nil) -> String (21320.0)

自身から生成した 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::NilClass#to_json(state_or_hash = nil) -> String (21320.0)

自身から生成した JSON 形式の文字列を返します。

...返します。

"null" という文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash...
...指定します。

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

nil.to_json # => "null"
//}...

JSON::Generator::GeneratorMethods::TrueClass#to_json(state_or_hash = nil) -> String (21320.0)

自身から生成した JSON 形式の文字列を返します。

...or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash
指定します。

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

true.to_json #...

絞り込み条件を変える

BigDecimal#to_json(*args) -> String (21143.0)

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

...ods::Hash#to_json を呼び出しています。

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

//emlist[例][ruby]{
require 'json/add/bigdecimal'
BigDecimal('0.123456789123456789').to_json # => "{\"json_class\":\"BigDecimal\",\"...
...b\":\"36:0.123456789123456789e0\"}"
//}

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

Complex#to_json(*args) -> String (21143.0)

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

...::GeneratorMethods::Hash#to_json を呼び出しています。

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

//emlist[例][ruby]{
require 'json/add/complex'
Complex(2, 3).to_json # => "{\"json_class\":\"Complex\",\"r\":2,\"i\":...
...3}"
//}

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

Rational#to_json(*args) -> String (21143.0)

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

...eneratorMethods::Hash#to_json を呼び出しています。

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

//emlist[例][ruby]{
require 'json/add/rational'
Rational(1, 3).to_json # => "{\"json_class\":\"Rational\",\"n\":1,\"d\":...
...3}"
//}

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

Symbol#to_json(*args) -> String (21137.0)

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

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

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

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

BigDecimal#to_json(*args) -> String (21131.0)

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

...:Hash#to_json を呼び出しています。

@param args 使用しません。

//emlist[例][ruby]{
require 'json/add/bigdecimal'
BigDecimal('0.123456789123456789').to_json # => "{\"json_class\":\"BigDecimal\",\"b\":\"36:0.123456789123456789e0\"}"
//}

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

絞り込み条件を変える

Complex#to_json(*args) -> String (21131.0)

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

...ら JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。

@param args 使用しません。

//emlist[例][ruby]{
require 'json/add/complex'
Complex(2, 3).to_json # => "{\"json_class\":\"Complex\",\"r\":2,\"i\":3}"
//}

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

Rational#to_json(*args) -> String (21131.0)

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

...JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。

@param args 使用しません。

//emlist[例][ruby]{
require 'json/add/rational'
Rational(1, 3).to_json # => "{\"json_class\":\"Rational\",\"n\":1,\"d\":3}"
//}

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

JSON::Generator::GeneratorMethods::String#to_json(state_or_hash = nil) -> String (18338.0)

自身から生成した JSON 形式の文字列を返します。

...す。

@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"
//}...
<< 1 2 > >>