class Rack::Protection::EncryptedCookie::Base64::JSON

valid JSON composite type, either a Hash or an Array.
N.B. Unlike other encoding methods, the contained objects must be a

def decode(str)

def decode(str)
  return unless str
  begin
    ::JSON.parse(super(str))
  rescue StandardError
    nil
  end
end

def encode(obj)

def encode(obj)
  super(::JSON.dump(obj))
end