44件ヒット
[1-44件を表示]
(0.058秒)
種類
- モジュール関数 (22)
- インスタンスメソッド (22)
ライブラリ
- json (44)
クラス
-
JSON
:: State (22)
モジュール
- JSON (22)
キーワード
- generate (11)
-
object
_ nl= (11) - unparse (11)
検索結果
先頭4件
-
JSON
:: State # object _ nl -> String (18226.0) -
JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を返します。
...json"
json_state = JSON::State.new(object_nl: "")
json_state.object_nl # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state = JSON::State.new(object_nl: "\n")
json_state.object_nl # => "\n"
puts JSON.ge... -
JSON
:: State # object _ nl=(string) (6232.0) -
JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列をセットします。
...をセットします。
@param string JSON 形式の文字列中に現れる JavaScript のオブジェクトの行末に挿入する文字列を指定します。
//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(object_nl: "")
json_state.object_nl # => ""
puts JSON.g......enerate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state.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 (132.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...文字列です。
: :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 J... -
JSON
. # unparse(object , state = nil) -> String (132.0) -
与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。
...文字列です。
: :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 J...