るりまサーチ

最速Rubyリファレンスマニュアル検索!
685件ヒット [201-300件を表示] (0.280秒)

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

検索結果

<< < 1 2 3 4 5 ... > >>

JSON::State#buffer_initial_length -> Integer (9101.0)

This integer returns the current initial length of the buffer.

...This integer returns the current initial length of the buffer....

JSON::State#buffer_initial_length=(length) (9101.0)

This sets the initial length of the buffer to length, if length > 0, otherwise its value isn't changed.

...This sets the initial length of the buffer to length, if length > 0,
otherwise its value isn't changed....

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

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

...SON 形式の文字列を返します。

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

JSON::Generator::GeneratorMethods::FalseClass#to_json(state_or_hash = nil) -> String (6220.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::Hash#to_json(state_or_hash = nil) -> String (6220.0)

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

...SON 形式の文字列を返します。

@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 (6220.0)

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

...SON 形式の文字列を返します。

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

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

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

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

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

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

自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。

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

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

cla...
...ss Person
a
ttr :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 (6220.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 3 4 5 ... > >>