Sha256: aa6d0fb4c11ecef35aebdd07e1496e052cdd00bc7542237bd2fc53400e7b95c4

Contents?: true

Size: 317 Bytes

Versions: 16

Compression:

Stored size: 317 Bytes

Contents

# frozen_string_literal: true

require 'oj'

module Ougai::Serializers
  class JsonOj < Ougai::Serializer
    OJ_OPTIONS = { mode: :custom, time_format: :xmlschema,
                   use_as_json: true, use_to_hash: true, use_to_json: true }

    def serialize(data)
      Oj.dump(data, OJ_OPTIONS)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ougai-2.0.0-java lib/ougai/serializers/json_oj.rb
ougai-2.0.0 lib/ougai/serializers/json_oj.rb
ougai-1.9.1-java lib/ougai/serializers/json_oj.rb
ougai-1.9.1 lib/ougai/serializers/json_oj.rb
ougai-1.9.0-java lib/ougai/serializers/json_oj.rb
ougai-1.9.0 lib/ougai/serializers/json_oj.rb
ougai-1.8.5 lib/ougai/serializers/json_oj.rb
ougai-1.8.4 lib/ougai/serializers/json_oj.rb
ougai-1.8.3 lib/ougai/serializers/json_oj.rb
ougai-1.8.2 lib/ougai/serializers/json_oj.rb
ougai-1.8.1 lib/ougai/serializers/json_oj.rb
ougai-1.8.0-java lib/ougai/serializers/json_oj.rb
ougai-1.8.0 lib/ougai/serializers/json_oj.rb
ougai-1.7.1 lib/ougai/serializers/json_oj.rb
ougai-1.7.1-java lib/ougai/serializers/json_oj.rb
ougai-1.7.0 lib/ougai/serializers/json_oj.rb