toJsonEncoded method

  1. @override
String toJsonEncoded({
  1. O? obj,
  2. JsonEncoder? jsonEncoder,
  3. bool pretty = false,
  4. bool duplicatedEntitiesAsID = false,
})
override

Returns a JSON encoded. See toJson.

Implementation

@override
String toJsonEncoded(
    {O? obj,
    JsonEncoder? jsonEncoder,
    bool pretty = false,
    bool duplicatedEntitiesAsID = false}) {
  obj ??= object;

  jsonEncoder ??= JsonEncoder.defaultEncoder;
  return jsonEncoder.encode(obj,
      pretty: pretty, duplicatedEntitiesAsID: duplicatedEntitiesAsID);
}