isEncodedJSON function

bool isEncodedJSON(
  1. String? s
)

Returns true if s is a encoded JSON String of a primitive value.

Implementation

bool isEncodedJSON(String? s) {
  if (s == null) return false;
  s = s.trim();
  if (s.isEmpty) return false;

  return _isEncodedJSONPrimitive(s) ||
      _isEncodedJSONList(s) ||
      _isEncodedJSONMap(s);
}