# frozen_string_literal: true
class UserSettingsSerializer
def self.load(value)
json = begin
if value.blank?
{}
else
JSON.parse(value, symbolize_names: true)
end
UserSettings.new(json)
def self.dump(value)
JSON.dump(value.as_json)