aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/coders/json.rb
blob: cb185a881e7d185a7a38c9c2403302b102496d1d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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