Sha256: feff4de6e356e5b60140720cba19c48e8e04437f0bdad31c6756667c9dbddf9e

Contents?: true

Size: 332 Bytes

Versions: 19

Compression:

Stored size: 332 Bytes

Contents

require 'active_support/json'

module Draftsman
  module Serializers
    module Json
      extend self # makes all instance methods become module methods as well

      def load(string)
        ActiveSupport::JSON.decode string
      end

      def dump(object)
        ActiveSupport::JSON.encode object
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
draftsman-0.7.2 lib/draftsman/serializers/json.rb
draftsman-0.7.1 lib/draftsman/serializers/json.rb
draftsman-0.7.0 lib/draftsman/serializers/json.rb
draftsman-0.6.0 lib/draftsman/serializers/json.rb
draftsman-0.5.1 lib/draftsman/serializers/json.rb
draftsman-0.5.0 lib/draftsman/serializers/json.rb
draftsman-0.4.0 lib/draftsman/serializers/json.rb
draftsman-0.3.7 lib/draftsman/serializers/json.rb
draftsman-0.3.6 lib/draftsman/serializers/json.rb
draftsman-0.3.5 lib/draftsman/serializers/json.rb
draftsman-0.3.4 lib/draftsman/serializers/json.rb
draftsman-0.3.3 lib/draftsman/serializers/json.rb
draftsman-0.3.2 lib/draftsman/serializers/json.rb
draftsman-0.3.1 lib/draftsman/serializers/json.rb
draftsman-0.3.0 lib/draftsman/serializers/json.rb
draftsman-0.2.1 lib/draftsman/serializers/json.rb
draftsman-0.2.0 lib/draftsman/serializers/json.rb
draftsman-0.1.1 lib/draftsman/serializers/json.rb
draftsman-0.1.0 lib/draftsman/serializers/json.rb