Sha256: 04cd49eb198291d1cc58cc9a0a4cb5bcdae0044c6f05ac44327056e34a3ab418

Contents?: true

Size: 369 Bytes

Versions: 32

Compression:

Stored size: 369 Bytes

Contents

require 'json'

module Restfully
  module MediaType

    class ApplicationJson < AbstractMediaType
      class JSONParser
        def self.load(io, *args)
          JSON.load(io)
        end
        def self.dump(object, *args)
          JSON.dump(object)
        end
      end
      set :signature, "application/json"
      set :parser, JSONParser
    end

  end

end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
restfully-1.3.0 lib/restfully/media_type/application_json.rb
restfully-1.2.0 lib/restfully/media_type/application_json.rb
restfully-1.1.1 lib/restfully/media_type/application_json.rb
restfully-1.1.0 lib/restfully/media_type/application_json.rb
restfully-1.0.8 lib/restfully/media_type/application_json.rb
restfully-1.0.7 lib/restfully/media_type/application_json.rb
restfully-1.0.6 lib/restfully/media_type/application_json.rb
restfully-1.0.5 lib/restfully/media_type/application_json.rb
restfully-1.0.4 lib/restfully/media_type/application_json.rb
restfully-1.0.3 lib/restfully/media_type/application_json.rb
restfully-1.0.2 lib/restfully/media_type/application_json.rb
restfully-1.0.1 lib/restfully/media_type/application_json.rb
restfully-1.0.0 lib/restfully/media_type/application_json.rb
restfully-1.0.0.rc2 lib/restfully/media_type/application_json.rb
restfully-1.0.0.rc1 lib/restfully/media_type/application_json.rb
restfully-0.8.8 lib/restfully/media_type/application_json.rb
restfully-0.8.7 lib/restfully/media_type/application_json.rb
restfully-0.8.6 lib/restfully/media_type/application_json.rb
restfully-0.8.5 lib/restfully/media_type/application_json.rb
restfully-0.8.4 lib/restfully/media_type/application_json.rb