Updated to avoid deprecation of encode and decode methods in multi_json gem.

This commit is contained in:
Bob Aman committed 2012-04-24 14:39:25 +03:00
1 parent 96b697bd5f
commit c651d69674
6 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -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