るりまサーチ

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

別のキーワード

  1. json generatorerror
  2. json json::generatorerror
  3. generatorerror
  4. generatorerror json
  5. unparsererror json::generatorerror

ライブラリ

クラス

キーワード

検索結果

JSON::State#generate(obj) -> String (17.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::Generator::GeneratorMethods::String#to_json_raw_object -> Hash (7.0)

生の文字列を格納したハッシュを生成します。

...する場合に使用してください。

require 'json'
"にほんご".encode("euc-jp").to_json_raw_object
# => {"json_class"=>"String", "raw"=>[164, 203, 164, 219, 164, 243, 164, 180]}
"にほんご".encode("euc-jp").to_json # source sequence is illegal/malformed (JSON::GeneratorError)...