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
4 changes: 3 additions & 1 deletion xml/System.Text.Json/Utf8JsonWriter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
`Utf8JsonWriter` writes the text sequentially with no caching and by default adheres to the [JSON RFC](https://tools.ietf.org/html/rfc8259), with the exception of writing comments.

A method that attempts to write invalid JSON when validation is enabled throws a <xref:System.InvalidOperationException> with a context-specific error message.

Since this type is a ref struct, it does not directly support async. However, it does provide support for reentrancy to write partial data and to continue writing in chunks.
To be able to format the output with indentation and white space OR to skip validation, create an instance of <xref:System.Text.Json.JsonWriterState> and pass that in to the writer.

To be able to format the output with indentation and white space OR to skip validation, create an instance of <xref:System.Text.Json.JsonWriterOptions> and pass it in to the writer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the only change that would need to be made. The type is no longer a ref struct, and a few APIs/comments changed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably re-run the tool to grab comments from source similar to what @carlossanlop had done previously (#2360)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey team, I re-ran the tool and opened a new PR with the most up to date API versions: #2471

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That PR doesn't contain this change so do we need to run the tool replacing existing content too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the case of "merge-conflict (case 2 below)" which means we need to manually update the contents to match the new content.

Here are the cases:

  1. Source contains comments, docs repo doesn't - @carlossanlop tool captures the diff and adds the content.
  2. Source contains comments, docs contains comments - usually do nothing (the tool ignores this), docs are the source of truth (unless an update was required/API change/etc - then manual updates needed).
  3. Source doesn't contain comments, docs repo contains comments - do nothing, we have the docs already.
  4. Source doesn't contain comments, docs repo doesn't contain comments - dev/docs team should add comments to this repo.


]]></format>
</remarks>
Expand Down