Class: MultiJson::JrJackson
- Inherits:
-
Object
- Object
- MultiJson::JrJackson
- Defined in:
- lib/multi_json-jr_jackson.rb,
lib/multi_json-jr_jackson/version.rb
Overview
Must be ‘class` as MultiJson lets any “Class” through without validation
Constant Summary collapse
- DeserializationEngine =
::MultiJson.engine
- ParseError =
::MultiJson::JrJackson::DeserializationEngine::ParseError
- VERSION =
"0.0.1"
Class Method Summary collapse
Instance Method Summary collapse
-
#dump(object, options = {}) ⇒ Object
Instance dump/load.
- #load(string, options = {}) ⇒ Object
Class Method Details
.dump(object, options = {}) ⇒ Object
9 10 11 |
# File 'lib/multi_json-jr_jackson.rb', line 9 def self.dump(object, = {}) ::JrJackson::Json.generate(object) end |
.load(string, options = {}) ⇒ Object
13 14 15 |
# File 'lib/multi_json-jr_jackson.rb', line 13 def self.load(string, = {}) ::MultiJson::JrJackson::DeserializationEngine.load(string, ) end |
Instance Method Details
#dump(object, options = {}) ⇒ Object
Instance dump/load
20 21 22 |
# File 'lib/multi_json-jr_jackson.rb', line 20 def dump(object, = {}) self.class.dump(object, ) end |
#load(string, options = {}) ⇒ Object
24 25 26 |
# File 'lib/multi_json-jr_jackson.rb', line 24 def load(string, = {}) self.class.load(string, ) end |