Class: Fluent::Plugin::Serializer::Oj
- Inherits:
-
Object
- Object
- Fluent::Plugin::Serializer::Oj
- Includes:
- OpenSearch::Transport::Transport::Serializer::Base
- Defined in:
- lib/fluent/plugin/oj_serializer.rb
Instance Method Summary collapse
-
#dump(object, options = {}) ⇒ Object
Serialize a Hash to JSON string.
-
#load(string, options = {}) ⇒ Object
De-serialize a Hash from JSON string.
Instance Method Details
#dump(object, options = {}) ⇒ Object
Serialize a Hash to JSON string
43 44 45 |
# File 'lib/fluent/plugin/oj_serializer.rb', line 43 def dump(object, ={}) ::Oj.dump(object, ) end |
#load(string, options = {}) ⇒ Object
De-serialize a Hash from JSON string
37 38 39 |
# File 'lib/fluent/plugin/oj_serializer.rb', line 37 def load(string, ={}) ::Oj.load(string, ) end |