toJsonEncoded method

String toJsonEncoded({
  1. bool pretty = false,
})

Implementation

String toJsonEncoded({bool pretty = false}) {
  var json = toJson();
  if (pretty) {
    return dart_convert.JsonEncoder.withIndent('  ').convert(json);
  } else {
    return dart_convert.json.encode(json);
  }
}