fromJson static method

  1. @visibleForTesting
DocReaderException? fromJson(
  1. dynamic jsonObject
)

Implementation

@visibleForTesting
static DocReaderException? fromJson(jsonObject) {
  if (jsonObject == null) return null;
  var result = DocReaderException();

  result._code = ErrorCodes.getByValue(jsonObject["code"])!;
  result._message = jsonObject["message"] ?? "";

  return result;
}