24件ヒット
[1-24件を表示]
(0.015秒)
ライブラリ
- json (24)
キーワード
-
to
_ json (12) -
to
_ json _ raw _ object (12)
検索結果
先頭2件
-
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (101.0) -
自身から生成した JSON 形式の文字列を返します。
...返すことがあります。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emli... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw _ object -> Hash (101.0) -
生の文字列を格納したハッシュを生成します。
生の文字列を格納したハッシュを生成します。
このメソッドは UTF-8 の文字列ではなく生の文字列を 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::...