Sha256: b0853795bdca573805f3062b910b5c8f833f4dea81b0825ad9156257b26703d6

Contents?: true

Size: 582 Bytes

Versions: 6

Compression:

Stored size: 582 Bytes

Contents

# frozen_string_literal: true

module Qonfig
  module Loaders
    # @api private
    # @since 0.5.0
    module JSON
      # @since 0.5.0
      extend Qonfig::Loaders::Basic

      class << self
        # @param data [String]
        # @return [Object]
        #
        # @api private
        # @since 0.5.0
        def load(data)
          ::JSON.parse(data, max_nesting: false, allow_nan: true)
        end

        # @return [Object]
        #
        # @api private
        # @since 0.5.0
        def load_empty_data
          load('{}')
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
qonfig-0.10.0 lib/qonfig/loaders/json.rb
qonfig-0.9.0 lib/qonfig/loaders/json.rb
qonfig-0.8.0 lib/qonfig/loaders/json.rb
qonfig-0.7.0 lib/qonfig/loaders/json.rb
qonfig-0.6.0 lib/qonfig/loaders/json.rb
qonfig-0.5.0 lib/qonfig/loaders/json.rb