Module: Zerial::BaseSerializer

Instance Method Summary collapse

Instance Method Details

#from_json(json_string) ⇒ Object



7
8
9
10
11
# File 'lib/zerial/base_serializer.rb', line 7

def from_json (json_string)
  from_loaded_json(
    JSON.load(json_string)
  )
end

#to_json(object) ⇒ Object



3
4
5
# File 'lib/zerial/base_serializer.rb', line 3

def to_json (object)
  as_json(object).to_json
end