Updated to avoid deprecation of encode and decode methods in multi_json gem.
This commit is contained in:
1 parent
96b697bd5f
commit
c651d69674
6 files changed
+10
-10
No files matched your search
@@ -103,7 +103,7 @@ module Google
|
||||
|
||||
def serialize_body(body)
|
||||
return body.to_json if body.respond_to?(:to_json)
|
||||
return MultiJson.encode(options[:body_object].to_hash) if body.respond_to?(:to_hash)
|
||||
return MultiJson.dump(options[:body_object].to_hash) if body.respond_to?(:to_hash)
|
||||
raise TypeError, 'Could not convert body object to JSON.' +
|
||||
'Must respond to :to_json or :to_hash.'
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user