isJsonPrimitive function

bool isJsonPrimitive(
  1. Object? value
)

Checks if a value is a JSON primitive

Implementation

bool isJsonPrimitive(Object? value) {
  return value == null || value is String || value is num || value is bool;
}