jsonSize method

int? jsonSize()

Gets the size of this JSON string in bytes

Returns the size in bytes or null if string is invalid JSON

Example:

final size = '{"name":"John"}'.jsonSize();

Implementation

int? jsonSize() {
  return QJSONUtils.getSize(this);
}