44件ヒット
[1-44件を表示]
(0.045秒)
種類
- モジュール関数 (22)
- インスタンスメソッド (22)
ライブラリ
- json (44)
クラス
-
JSON
:: State (22)
モジュール
- JSON (22)
キーワード
- generate (11)
-
space
_ before= (11) - unparse (11)
検索結果
先頭4件
-
JSON
:: State # space _ before -> String (18226.0) -
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列を返します。
...json_state = JSON::State.new(space_before: "")
json_state.space_before # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state = JSON::State.new(space_before: " ")
json_state.space_before # => " "
puts JSO... -
JSON
:: State # space _ before=(string) (6232.0) -
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列をセットします。
...。
@param string JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の
前に挿入する文字列をセットします。
//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(space_before: "")
json_state.space_before......# => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state.space_before = " "
json_state.space_before # => " "
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...