debian-mirror-gitlab/lib/serializers/json.rb

19 lines
311 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
module Serializers
2019-10-12 21:52:04 +05:30
# Make the resulting hash have deep indifferent access
2021-09-04 01:27:46 +05:30
class Json
2019-02-15 15:39:39 +05:30
class << self
def dump(obj)
obj
end
def load(data)
return if data.nil?
Gitlab::Utils.deep_indifferent_access(data)
end
end
end
end