るりまサーチ (Ruby 2.7.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.009秒)

別のキーワード

  1. string encode
  2. _builtin encode
  3. string encode!
  4. base64 encode64
  5. _builtin encode!

検索結果

JSON::Generator::GeneratorMethods::String#to_json_raw_object -> Hash (46.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...