aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/lib/active_record/coders/json.rb
blob: a69b38487e52fcbd94b89970deeac9331b0832cd (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                             







                                       
                                                           



         
# frozen_string_literal: true

module ActiveRecord
  module Coders # :nodoc:
    class 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