Ruby 2.1.0 リファレンスマニュアル > ライブラリ一覧 > jsonライブラリ > JSON::Generator::GeneratorMethods::String::Extendモジュール

module JSON::Generator::GeneratorMethods::String::Extend

クラスの継承リスト: JSON::Generator::GeneratorMethods::String::Extend
aliases: JSON::Ext::Generator::GeneratorMethods::String::Extend

要約

String に JSON で使用する特異メソッドを追加するためのモジュールです。

目次

特異メソッド
json_create

特異メソッド

json_create(hash) -> String[permalink][rdoc]

JSON のオブジェクトから Ruby の文字列を生成して返します。

[PARAM] hash:
キーとして "raw" という文字列を持ち、その値として数値の配列を持つハッシュを指定します。
String.json_create({"raw" => [0x41, 0x42, 0x43]}) # => "ABC"