Sha256: aab294246983ce3f8e47add00ce69ec11e1c5aea42b337cf139846bd83bc94cf

Contents?: true

Size: 237 Bytes

Versions: 5

Compression:

Stored size: 237 Bytes

Contents

module Grape
  module Formatter
    module Json
      class << self

        def call(object, env)
          return object.to_json if object.respond_to?(:to_json)
          MultiJson.dump(object)
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
grape-0.6.1 lib/grape/formatter/json.rb
grape-0.6.0 lib/grape/formatter/json.rb
grape-0.5.0 lib/grape/formatter/json.rb
grape-0.4.1 lib/grape/formatter/json.rb
grape-0.4.0 lib/grape/formatter/json.rb