Class: Thrift::JsonSerializer
- Inherits:
-
Serializer
- Object
- Serializer
- Thrift::JsonSerializer
- Defined in:
- lib/thrift/utf8_json.rb
Instance Method Summary collapse
-
#initialize ⇒ JsonSerializer
constructor
A new instance of JsonSerializer.
- #serialize(base) ⇒ Object
Constructor Details
#initialize ⇒ JsonSerializer
Returns a new instance of JsonSerializer.
18 19 20 |
# File 'lib/thrift/utf8_json.rb', line 18 def initialize super Utf8JsonProtocolFactory.new end |
Instance Method Details
#serialize(base) ⇒ Object
22 23 24 |
# File 'lib/thrift/utf8_json.rb', line 22 def serialize(base) super.force_encoding('UTF-8') end |