Sha256: e0d721e8a93a54349620681fa374e47e0fb541f51b3fca5c2817771c7d57b7bd

Contents?: true

Size: 589 Bytes

Versions: 4

Compression:

Stored size: 589 Bytes

Contents

require 'microsoft_kiota_abstractions'

module MicrosoftKiotaSerializationJson
  class JsonSerializationWriterFactory
    include MicrosoftKiotaAbstractions::SerializationWriterFactory

    def get_valid_content_type
      'application/json'
    end

    def get_serialization_writer(content_type)
      if !content_type
        raise StandardError, 'content type cannot be undefined or empty'
      elsif get_valid_content_type != content_type
        raise StandardError, `expected a #{get_valid_content_type} content type`
      end

      JsonSerializationWriter.new
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
microsoft_kiota_serialization_json-0.9.1 lib/microsoft_kiota_serialization_json/json_serialization_writer_factory.rb
microsoft_kiota_serialization_json-0.9.0 lib/microsoft_kiota_serialization_json/json_serialization_writer_factory.rb
microsoft_kiota_serialization_json-0.8.0 lib/microsoft_kiota_serialization_json/json_serialization_writer_factory.rb
microsoft_kiota_serialization_json-0.7.0 lib/microsoft_kiota_serialization_json/json_serialization_writer_factory.rb