るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. fileutils cp_r
  5. bigdecimal to_r

ライブラリ

クラス

モジュール

キーワード

検索結果

JSON::State#object_nl -> String (18325.0)

JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を返します。

...N 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を返します。

//emlist[例][ruby]{
r
equire "json"

json_state = JSON::State.new(object_nl: "")
json_state.object_nl # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], j...
...son_state)
# => [1,2,{"name":"tanaka","age":19}]

json_state = JSON::State.new(object_nl: "\n")
json_state.object_nl # => "\n"
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)

# => [1,2,{
# "name":"tanaka",
# "age":19
# }]
//}...

JSON.#generate(object, state = nil) -> String (6206.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...:Infinity,
JSON::MinusInfinity を生成することもありません。

unparse は将来削除される予定です。

@param object JSON 形式の文字列に変換するオブジェクトを指定します。

@param state JSON::State または、to_hash や to_h メソッドでハッシュ...
...:space
a string that is put after, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default:...
...'')
: :check_circular
真を指定した場合、生成するオブジェクトの循環をチェックします。
この動作がデフォルトです。
: :allow_nan
真を指定した場合、JSON::NaN, JSON::Infinity,
JSON::MinusInfinity を生成することを許すようになりま...

JSON.#unparse(object, state = nil) -> String (6206.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...:Infinity,
JSON::MinusInfinity を生成することもありません。

unparse は将来削除される予定です。

@param object JSON 形式の文字列に変換するオブジェクトを指定します。

@param state JSON::State または、to_hash や to_h メソッドでハッシュ...
...:space
a string that is put after, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of a JSON array (default:...
...'')
: :check_circular
真を指定した場合、生成するオブジェクトの循環をチェックします。
この動作がデフォルトです。
: :allow_nan
真を指定した場合、JSON::NaN, JSON::Infinity,
JSON::MinusInfinity を生成することを許すようになりま...