diff --git a/lib/active_resource/formats/json_format.rb b/lib/active_resource/formats/json_format.rb index 827d1cc23a..b92ecc6ff8 100644 --- a/lib/active_resource/formats/json_format.rb +++ b/lib/active_resource/formats/json_format.rb @@ -18,6 +18,7 @@ def encode(hash, options = nil) end def decode(json) + return nil if json.nil? Formats.remove_root(ActiveSupport::JSON.decode(json)) end end