jsonBytesView function

Uint8List jsonBytesView(
  1. Object? value
)

value as JSON bytes with no copy, for the response of the native server. The result is a part of the encoder buffer: call giveBackJsonBytes when it is copied. All other code uses JSON.bytes.

With CoreFlags.sdkJsonEncoder the result is a list of its own.

Implementation

Uint8List jsonBytesView(Object? value) {
  if (useSdkJsonEncoder) return _sdkBytes(value);
  return _jsonBytesEncoder.convertView(value);
}