module Sequel::Plugins::QueryCache::Serializer::JSON
While this works, if you’re using binary data at all, it’s not a great idea and MessagePack
is faster.
Public Class Methods
deserialize(string)
click to toggle source
Keys are specifically NOT symbolized here. This is done by Sequel::Plugins::Cacheable::DatasetMethods#fetch_rows since only the top level needs to have symbolized keys for Sequel’s purposes.
# File lib/sequel-query-cache/serializer/json.rb, line 18 def self.deserialize(string) ::JSON.parse(string) end
serialize(obj)
click to toggle source
# File lib/sequel-query-cache/serializer/json.rb, line 10 def self.serialize(obj) binding.pry obj.to_json end