generate static method

JsonSerializationException generate(
  1. String? message,
  2. [Type? toType]
)

Implementation

static JsonSerializationException generate(String? message, [Type? toType]) {
  return JsonSerializationException(message ??
      ErrorMessages.format(
          ErrorMessages.jsonSerializationError, [toType.toString()]));
}