Sha256: 9343841003b03b6466570881005270711d1ff677ea3da0158c21b3b3da7b16f4

Contents?: true

Size: 240 Bytes

Versions: 13

Compression:

Stored size: 240 Bytes

Contents

module Grape
  module Formatter
    module Json
      class << self
        def call(object, _env)
          return object.to_json if object.respond_to?(:to_json)
          ::Grape::Json.dump(object)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/grape-1.2.5/lib/grape/formatter/json.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/grape-1.2.5/lib/grape/formatter/json.rb
grape-1.2.5 lib/grape/formatter/json.rb
grape-1.2.4 lib/grape/formatter/json.rb
grape-1.2.3 lib/grape/formatter/json.rb
grape-1.2.2 lib/grape/formatter/json.rb
grape-1.2.1 lib/grape/formatter/json.rb
grape-1.2.0 lib/grape/formatter/json.rb
grape-1.1.0 lib/grape/formatter/json.rb
grape-1.0.3 lib/grape/formatter/json.rb
grape-1.0.2 lib/grape/formatter/json.rb
grape-1.0.1 lib/grape/formatter/json.rb
grape-1.0.0 lib/grape/formatter/json.rb