Sha256: bfe9dee9969e9fa3487b9ed00dbe7af583bf1c4df75cbb340126b9410ab3ce72
Contents?: true
Size: 368 Bytes
Versions: 1
Compression:
Stored size: 368 Bytes
Contents
require 'msgpack' module Pallets module Serializers class Msgpack def dump(data) MessagePack.pack(data) end def load(data) # Strings coming from the backend are UTF-8 (Encoding.default_external) # while msgpack dumps ASCII-8BIT MessagePack.unpack(data.force_encoding('ASCII-8BIT')) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pallets-0.3.0 | lib/pallets/serializers/msgpack.rb |