Class: Elasticsearch::Transport::Transport::Serializer::MultiJson
- Inherits:
-
Object
- Object
- Elasticsearch::Transport::Transport::Serializer::MultiJson
- Includes:
- Base
- Defined in:
- lib/elasticsearch/transport/transport/serializer/multi_json.rb
Overview
A default JSON serializer (using [MultiJSON](rubygems.org/gems/multi_json))
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.
Methods included from Base
Instance Method Details
#dump(object, options = {}) ⇒ Object
Serialize a Hash to JSON string
46 47 48 |
# File 'lib/elasticsearch/transport/transport/serializer/multi_json.rb', line 46 def dump(object, ={}) ::MultiJson.dump(object, ) end |
#load(string, options = {}) ⇒ Object
De-serialize a Hash from JSON string
40 41 42 |
# File 'lib/elasticsearch/transport/transport/serializer/multi_json.rb', line 40 def load(string, ={}) ::MultiJson.load(string, ) end |