Sha256: 640bae168d0599ff0ecc3c602cd0062a03ca16864f972cac205318be1d019620

Contents?: true

Size: 293 Bytes

Versions: 36

Compression:

Stored size: 293 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module Coders # :nodoc:
    module JSON # :nodoc:
      def self.dump(obj)
        ActiveSupport::JSON.encode(obj)
      end

      def self.load(json)
        ActiveSupport::JSON.decode(json) unless json.blank?
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 4 rubygems

Version Path
activerecord-8.0.0 lib/active_record/coders/json.rb
activerecord-7.2.2 lib/active_record/coders/json.rb
activerecord-7.1.5 lib/active_record/coders/json.rb
activerecord-8.0.0.rc2 lib/active_record/coders/json.rb
activerecord-7.2.1.2 lib/active_record/coders/json.rb
activerecord-7.1.4.2 lib/active_record/coders/json.rb
activerecord-8.0.0.rc1 lib/active_record/coders/json.rb
activerecord-7.2.1.1 lib/active_record/coders/json.rb
activerecord-7.1.4.1 lib/active_record/coders/json.rb
activerecord-8.0.0.beta1 lib/active_record/coders/json.rb
omg-activerecord-8.0.0.alpha9 lib/active_record/coders/json.rb
omg-activerecord-8.0.0.alpha8 lib/active_record/coders/json.rb
omg-activerecord-8.0.0.alpha7 lib/active_record/coders/json.rb
omg-activerecord-8.0.0.alpha4 lib/active_record/coders/json.rb
omg-activerecord-8.0.0.alpha3 lib/active_record/coders/json.rb
omg-activerecord-8.0.0.alpha2 lib/active_record/coders/json.rb
omg-activerecord-8.0.0.alpha1 lib/active_record/coders/json.rb
activerecord-7.1.4 lib/active_record/coders/json.rb
activerecord-7.2.1 lib/active_record/coders/json.rb
activerecord-7.2.0 lib/active_record/coders/json.rb