Sha256: 9f050b497f95c0e747cad4c8e57e849f0da5fea8b54ef8175a0520ed8b3c054d

Contents?: true

Size: 235 Bytes

Versions: 7

Compression:

Stored size: 235 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

7 entries across 7 versions & 2 rubygems

Version Path
grape-security-0.8.0 lib/grape/formatter/json.rb
grape-0.11.0 lib/grape/formatter/json.rb
grape-0.10.1 lib/grape/formatter/json.rb
grape-0.10.0 lib/grape/formatter/json.rb
grape-0.9.0 lib/grape/formatter/json.rb
grape-0.8.0 lib/grape/formatter/json.rb
grape-0.7.0 lib/grape/formatter/json.rb