sizeOf function

int sizeOf(
  1. JSONSerialisable obj
)

Implementation

int sizeOf(JSONSerialisable obj) {
  final serialized = json.encode(obj.toJson());
  final buffer = utf8.encode(serialized);
  final size = buffer.length;
  return size;
}