るりまサーチ

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

別のキーワード

  1. json space_before
  2. state space_before
  3. json space_before=
  4. state space_before=
  5. state space

ライブラリ

クラス

モジュール

キーワード

検索結果

JSON::State#space_before -> String (18225.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.#generate(object, state = nil) -> String (106.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: '')
: :a...

JSON.#unparse(object, state = nil) -> String (106.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: '')
: :a...

JSON::State#to_h -> Hash (106.0)

自身をハッシュに変換します。

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

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# :depth=>0,
#...

JSON::State#to_hash -> Hash (106.0)

自身をハッシュに変換します。

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

json_state = JSON::State.new
pp json_state.to_h

# => {:indent=>"",
# :space=>"",
# :space_before=>"",
# :object_nl=>"",
# :array_nl=>"",
# :allow_nan=>false,
# :ascii_only=>false,
# :max_nesting=>100,
# :depth=>0,
#...

絞り込み条件を変える

JSON::State.new(options = {}) -> JSON::State (106.0)

自身を初期化します。

...
: :space
JSON 形式の文字列のトークン間に挿入する文字列を指定します。デフォルトは空文字列です。
: :space_before
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の
前に挿入する文字列をセットし...