1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Remove multijson hacks since latest release is sane again

This commit is contained in:
Mike Perham 2012-04-29 19:54:36 -07:00
parent c3c0dd1a93
commit 4850ed856f

View file

@ -83,21 +83,11 @@ module Sidekiq
end
def self.load_json(string)
# Can't reliably detect whether MultiJson responds to load, since it's
# a reserved word. Use adapter as a proxy for new features.
if MultiJson.respond_to?(:adapter)
MultiJson.load(string)
else
MultiJson.decode(string)
end
MultiJson.decode(string)
end
def self.dump_json(object)
if MultiJson.respond_to?(:dump)
MultiJson.dump(object)
else
MultiJson.encode(object)
end
MultiJson.encode(object)
end
end