assertJson method

void assertJson()

Asserts that isJson is true and throws an exception if not.

Implementation

void assertJson() {
  if (!isJson) {
    throw ApiServiceException('Response is array but expected single object', null, null);
  }
}