aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/coders/json.rb
blob: 75d3bfe625bfcbb4ffca439f2484459c68dfd79d (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.nil?
      end
    end
  end
end