jsonMinify method

String? jsonMinify()

Minifies this JSON string by removing whitespace

Returns the minified JSON string or null if parsing fails

Example:

final pretty = '''
{
  "name": "John",
  "age": 30
}
''';
print(pretty.jsonMinify()); // {"name":"John","age":30}

Implementation

String? jsonMinify() {
  return QJSONUtils.minify(this);
}