Welcome to mirror list, hosted at ThFree Co, Russian Federation.

symbolized_json.rb « serializers « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 78192ce31328085e5190058a33662fa36bc566ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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