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:
parent
c3c0dd1a93
commit
4850ed856f
1 changed files with 2 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue