Sha256: 853b203d351243adc10d9a2542f56717de2794b7c960c33bfe5a828490f7fa2b

Contents?: true

Size: 243 Bytes

Versions: 4

Compression:

Stored size: 243 Bytes

Contents

module Sojourn
  module Serializers
    class IndifferentJSON
      def self.load(string)
        JSON.parse(string || '{}').with_indifferent_access
      end

      def self.dump(hash)
        (hash || {}).to_json
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sojourn-0.1.1 lib/sojourn/serializers/indifferent_json.rb
sojourn-0.1.0 lib/sojourn/serializers/indifferent_json.rb
sojourn-1.0.0.pre2 lib/sojourn/serializers/indifferent_json.rb
sojourn-1.0.0.pre lib/sojourn/serializers/indifferent_json.rb