Sha256: e66392471a1ccfb397b797909ea83ebdbb2b35a0b0f47062bbe38e20e14de5c2
Contents?: true
Size: 435 Bytes
Versions: 8
Compression:
Stored size: 435 Bytes
Contents
# frozen_string_literal: true # Dumping and loading serialized tokens in JSON format. module DeviseJwtAuth::Concerns::TokensSerialization # Serialization hash to json def self.dump(object) object&.each_value(&:compact!) JSON.generate(object) end # Deserialization json to hash def self.load(json) case json when String JSON.parse(json) when NilClass {} else json end end end
Version data entries
8 entries across 8 versions & 3 rubygems