Method: Newpack::APIHelper.json_deserialize

Defined in:
lib/newpack/api_helper.rb

.json_deserialize(json) ⇒ Object

Parses JSON string.

Parameters:



139
140
141
142
143
# File 'lib/newpack/api_helper.rb', line 139

def self.json_deserialize(json)
  return JSON.parse(json)
rescue StandardError
  raise TypeError, 'Server responded with invalid JSON.'
end