encodeToSink static method

void encodeToSink(
  1. Object? o,
  2. Sink<List<int>> sink, {
  3. bool pretty = false,
  4. JsonFieldMatcher? maskField,
  5. String maskText = '***',
  6. JsonFieldMatcher? removeField,
  7. bool removeNullFields = false,
  8. ToEncodableJsonProvider? toEncodableProvider,
  9. ToEncodable? toEncodable,
  10. EntityHandlerProvider? entityHandlerProvider,
  11. EntityCache? entityCache,
  12. bool? autoResetEntityCache,
})

Sames as encode but outputs to sink.

Implementation

static void encodeToSink(
  Object? o,
  Sink<List<int>> sink, {
  bool pretty = false,
  JsonFieldMatcher? maskField,
  String maskText = '***',
  JsonFieldMatcher? removeField,
  bool removeNullFields = false,
  ToEncodableJsonProvider? toEncodableProvider,
  ToEncodable? toEncodable,
  EntityHandlerProvider? entityHandlerProvider,
  EntityCache? entityCache,
  bool? autoResetEntityCache,
}) {
  var jsonEncoder = _buildJsonEncoder(
    maskField,
    maskText,
    removeField,
    removeNullFields,
    toEncodableProvider,
    toEncodable,
    entityHandlerProvider,
    entityCache,
  );

  return jsonEncoder.encodeToSink(
    o,
    sink,
    pretty: pretty,
    autoResetEntityCache: autoResetEntityCache,
  );
}