def parse_json(response)
      data = JSON.parse(response)
      fail OptaSD::Error.new(data), ErrorMessage.get_message(data['errorCode'].to_i) if data['errorCode']
      data
    end
def parse_json(response)
      data = JSON.parse(response)
      fail OptaSD::Error.new(data), ErrorMessage.get_message(data['errorCode'].to_i) if data['errorCode']
      data
    end
Parse JSON Response