Module: Vigiles::Utilities::JSON

Extended by:
T::Sig
Defined in:
lib/vigiles/utilities/json.rb

Class Method Summary collapse

Class Method Details

.parse_benignly(text) ⇒ Object



12
13
14
15
16
17
# File 'lib/vigiles/utilities/json.rb', line 12

def self.parse_benignly(text)
  ::JSON.parse(text)
rescue StandardError
  return text unless block_given?
  yield text
end