Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve JSON descriptions #5007

Merged
merged 6 commits into from
Oct 21, 2020
Merged

Improve JSON descriptions #5007

merged 6 commits into from
Oct 21, 2020

Conversation

gewarren
Copy link
Contributor

Contributes to dotnet/docs#21067.

@gewarren gewarren requested a review from layomia October 17, 2020 00:00
@opbld34
Copy link

opbld34 commented Oct 17, 2020

Docs Build status updates of commit cc9dd7e:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http.Json/HttpClientJsonExtensions.xml ✅Succeeded View
xml/System.Net.Http.Json/HttpContentJsonExtensions.xml ✅Succeeded View
xml/System.Text.Json/JsonSerializerDefaults.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld32
Copy link

opbld32 commented Oct 17, 2020

Docs Build status updates of commit 2bad84c:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http.Json/HttpClientJsonExtensions.xml ✅Succeeded View
xml/System.Net.Http.Json/HttpContentJsonExtensions.xml ✅Succeeded View
xml/System.Text.Json/JsonSerializerDefaults.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

Comment on lines 43 to 46
This member implies that:

- Property names are treated as case-sensitive.
- "PascalCase" name formatting should be employed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure that we have to mention this. If we do, what about all the other options e.g. ReadCommentHandling, DictionaryKeyPolicy etc.

If the intention is to contrast with Web options, maybe we should add that quoted numbers (JSON strings) are not allowed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was mainly just reformatting the existing text. But it seems like it would be helpful to list out all the options it prescribes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tdykstra What do you think?

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 we should link to here: https://docs.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializeroptions?view=net-5.0#properties since this ideally should list what the default value for each property is.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree with @layomia proposal, in which case explicitly mentioning property naming defaults isn't necessary here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interestingly, remarks for enum members seem to be bogus (ignored). I'll double check that that behavior is by design.

https://review.docs.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializerdefaults?view=net-5.0&branch=pr-en-us-5007

gewarren and others added 3 commits October 20, 2020 18:07
Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
@opbld31
Copy link

opbld31 commented Oct 21, 2020

Docs Build status updates of commit 16ac284:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http.Json/HttpClientJsonExtensions.xml ✅Succeeded View
xml/System.Net.Http.Json/HttpContentJsonExtensions.xml ✅Succeeded View
xml/System.Text.Json/JsonSerializerDefaults.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld32
Copy link

opbld32 commented Oct 21, 2020

Docs Build status updates of commit 43af631:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http.Json/HttpClientJsonExtensions.xml ✅Succeeded View
xml/System.Net.Http.Json/HttpContentJsonExtensions.xml ✅Succeeded View
xml/System.Text.Json/JsonSerializerDefaults.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld31
Copy link

opbld31 commented Oct 21, 2020

Docs Build status updates of commit 3405cf8:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http.Json/HttpClientJsonExtensions.xml ✅Succeeded View
xml/System.Net.Http.Json/HttpContentJsonExtensions.xml ✅Succeeded View
xml/System.Text.Json/JsonSerializerDefaults.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@gewarren gewarren merged commit 4c3160c into dotnet:master Oct 21, 2020
@gewarren gewarren deleted the json branch October 21, 2020 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants