toJsonString method Null safety

String toJsonString(
  1. {ValueSerializer? serializer}
)

Converts this object into a json representation. The serializer can be used to configure how individual values will be encoded. By default, DriftRuntimeOptions.defaultSerializer will be used. See ValueSerializer.defaults for details.

Implementation

String toJsonString({ValueSerializer? serializer}) {
  return json.encode(toJson(serializer: serializer));
}