debian-mirror-gitlab/lib/serializers/symbolized_json.rb
2021-09-30 23:02:18 +05:30

18 lines
317 B
Ruby

# frozen_string_literal: true
module Serializers
# Make the resulting hash have deep symbolized keys
class SymbolizedJson
class << self
def dump(obj)
obj
end
def load(data)
return if data.nil?
Gitlab::Utils.deep_symbolized_access(data)
end
end
end
end