Module: Qonfig::Loaders::JSON Private

Extended by:
Basic
Defined in:
lib/qonfig/loaders/json.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.5.0

Class Method Summary collapse

Methods included from Basic

load, load_empty_data, load_file

Class Method Details

.load(data) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • data (String)

Returns:

  • (Object)

Since:

  • 0.5.0



17
18
19
# File 'lib/qonfig/loaders/json.rb', line 17

def load(data)
  ::JSON.parse(data, max_nesting: false, allow_nan: true)
end

.load_empty_dataObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Object)

Since:

  • 0.5.0



25
26
27
# File 'lib/qonfig/loaders/json.rb', line 25

def load_empty_data
  load('{}')
end