るりまサーチ

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

別のキーワード

  1. json to_json
  2. json state
  3. json parser
  4. json parse
  5. json generate

ライブラリ

検索結果

JSON::Generator::GeneratorMethods::String#to_json_raw_object -> Hash (12151.0)

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

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

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::Ge...