Sha256: a903ab1e04e7ac2c3dccd6694e18ea7c543620628d34b611ce98c3ac78490d0d

Contents?: true

Size: 325 Bytes

Versions: 6

Compression:

Stored size: 325 Bytes

Contents

module Doggy
  module Serializer
    class Json
      # De-serialize a Hash from JSON string
      def self.load(string)
        ::JSON.load(string)
      end

      # Serialize a Hash to JSON string
      def self.dump(object, options = {})
        ::JSON.pretty_generate(object, options) + "\n"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
doggy-0.2.2 lib/doggy/serializer/json.rb
doggy-0.2.0 lib/doggy/serializer/json.rb
doggy-0.1.3 lib/doggy/serializer/json.rb
doggy-0.1.2 lib/doggy/serializer/json.rb
doggy-0.1.1 lib/doggy/serializer/json.rb
doggy-0.1.0 lib/doggy/serializer/json.rb