clear method

  1. @override
void clear()
override

If isImmutable is false, then allow the map to be cleared Throw JsonObjectLiteException if we're not allowed to clear.

Implementation

@override
void clear() {
  if (isImmutable == false) {
    _objectData.clear();
  } else {
    throw const JsonObjectLiteException('JsonObject is not extendable');
  }
}