module Grape::Formatter::Json

Public Class Methods

call(object, env) click to toggle source
# File lib/grape/formatter/json.rb, line 6
def call(object, env)
  return object.to_json if object.respond_to?(:to_json)
  MultiJson.dump(object)
end