るりまサーチ

最速Rubyリファレンスマニュアル検索!
348件ヒット [1-100件を表示] (0.104秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:j[x] > クラス:JSON::State[x]

別のキーワード

  1. encoding windows_31j
  2. _builtin windows_31j
  3. _builtin cswindows31j
  4. encoding cswindows31j
  5. json j

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

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

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

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

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

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

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

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

JSON::State#object_nl=(string) (6102.0)

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

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

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

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

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

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

JSON::State#[](name) -> object (3102.0)

Return the value returned by method name.

Return the value returned by method name.

JSON::State#generate(obj) -> String (3102.0)

Generates a valid JSON document from object obj and returns the result. If no valid JSON document can be created this method raises a GeneratorError exception.

...Generates a valid JSON document from object obj and returns the
result. If no valid JSON document can be created this method raises a
GeneratorError exception....

JSON::State#[]=(name, value) (3002.0)

Set the attribute name to value.

Set the attribute name to value.

絞り込み条件を変える

JSON::State#allow_nan? -> bool (3002.0)

NaN, Infinity, -Infinity を生成できる場合、真を返します。 そうでない場合は偽を返します。

...finity を生成できる場合、真を返します。
そうでない場合は偽を返します。

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

j
son_state = JSON::State.new({})
j
son_state.allow_nan? # => false
j
son_state = JSON::State.new(allow_nan: true)
j
son_state.allow_nan? # => true
//}

@see 4627...

JSON::State#array_nl -> String (3002.0)

JSON の配列の後に出力する文字列を返します。

...
J
SON の配列の後に出力する文字列を返します。

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

j
son_state = JSON::State.new({})
j
son_state.array_nl # => ""
j
son_state = JSON::State.new(array_nl: "\n")
j
son_state.array_nl # => "\n"
//}...

JSON::State#array_nl=(str) (3002.0)

JSON の配列の後に出力する文字列をセットします。

...
J
SON の配列の後に出力する文字列をセットします。

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

j
son_state = JSON::State.new({})
j
son_state.array_nl # => ""
j
son_state.array_nl = "\n"
j
son_state.array_nl # => "\n"
//}...

JSON::State#ascii_only? -> bool (3002.0)

ASCII 文字列のみを用いて JSON 形式の文字列を生成する場合に真を返します。 そうでない場合に偽を返します。

...ASCII 文字列のみを用いて JSON 形式の文字列を生成する場合に真を返します。
そうでない場合に偽を返します。...
<< 1 2 3 ... > >>