るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.031秒)
トップページ > バージョン:2.7.0[x] > クエリ:String[x] > モジュール:JSON::Generator::GeneratorMethods::Integer[x]

別のキーワード

  1. string []=
  2. string []
  3. string slice
  4. string slice!
  5. string gsub

ライブラリ

検索結果

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

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

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

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

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

10.to_json # => "10"
//}