Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/libraries/System.Memory.Data/src/System/BinaryData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,16 @@ public static BinaryData FromObjectAsJson<T>(T jsonSerializable, JsonSerializerO
/// <summary>
/// Converts the value of this instance to a string using UTF-8.
/// </summary>
/// <remarks>
/// No special treatment is given to the contents of the data, it is merely decoded as a UTF-8 string.
/// For a JPEG or other binary file format the string will largely be nonsense with many embedded NUL characters,
/// and UTF-8 JSON values will look like their file/network representation,
/// including starting and stopping quotes on a string.
/// </remarks>
/// <returns>
/// A string from the value of this instance, using UTF-8 to decode the bytes.
/// </returns>
/// <seealso cref="ToObjectFromJson{String}" />
public override unsafe string ToString()
{
ReadOnlySpan<byte> span = _bytes.Span;
Expand Down