lib/grape/formatter/json.rb in grape-0.3.2 vs lib/grape/formatter/json.rb in grape-0.4.0
- old
+ new
@@ -2,10 +2,9 @@
module Formatter
module Json
class << self
def call(object, env)
- return object if object.is_a?(String)
return object.to_json if object.respond_to?(:to_json)
MultiJson.dump(object)
end
end