Class: MultiJson::JrJackson

Inherits:
Object
  • Object
show all
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

Class Method Details

.dump(object, options = {}) ⇒ Object



9
10
11
# File 'lib/multi_json-jr_jackson.rb', line 9

def self.dump(object, options = {})
  ::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, options = {})
  ::MultiJson::JrJackson::DeserializationEngine.load(string, options)
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, options = {})
  self.class.dump(object, options)
end

#load(string, options = {}) ⇒ Object



24
25
26
# File 'lib/multi_json-jr_jackson.rb', line 24

def load(string, options = {})
  self.class.load(string, options)
end