class SeaMule::JsonEncoder
Public Instance Methods
decode(object)
click to toggle source
# File lib/seamule/json_encoder.rb, line 10 def decode(object) return unless object begin JSON.load(object) rescue ::JSON::JSONError => e raise SeaMule::DecodeException, e.message, e.backtrace end end
encode(object)
click to toggle source
# File lib/seamule/json_encoder.rb, line 6 def encode(object) JSON.dump(object) end