Class: ElasticSearch::Encoding::JSON
- Defined in:
- lib/elasticsearch/encoding/json.rb
Instance Method Summary collapse
Instance Method Details
#decode(string) ⇒ Object
10 11 12 |
# File 'lib/elasticsearch/encoding/json.rb', line 10 def decode(string) ActiveSupport::JSON.decode(string) end |
#encode(object) ⇒ Object
6 7 8 |
# File 'lib/elasticsearch/encoding/json.rb', line 6 def encode(object) ActiveSupport::JSON.encode(object) end |
#is_encoded?(object) ⇒ Boolean
14 15 16 |
# File 'lib/elasticsearch/encoding/json.rb', line 14 def is_encoded?(object) object.is_a?(String) end |