isJsonMimeType static method
Implementation
static bool isJsonMimeType(String? contentType) {
if (contentType == null) return false;
final mediaType = MediaType.parse(contentType);
return mediaType.mimeType == 'application/json' ||
mediaType.mimeType == 'text/json' ||
mediaType.subtype.endsWith('+json');
}