2018-09-02 10:35:15 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Serializers
|
2019-06-13 09:12:28 -04:00
|
|
|
# Make the resulting hash have deep indifferent access
|
2021-06-11 14:10:13 -04:00
|
|
|
class Json
|
2018-09-02 10:35:15 -04:00
|
|
|
class << self
|
|
|
|
def dump(obj)
|
|
|
|
obj
|
|
|
|
end
|
|
|
|
|
|
|
|
def load(data)
|
|
|
|
return if data.nil?
|
|
|
|
|
|
|
|
Gitlab::Utils.deep_indifferent_access(data)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|