-
Notifications
You must be signed in to change notification settings - Fork 6.1k
JSON Serialization docs #14208
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
JSON Serialization docs #14208
Conversation
|
@ahsonkhan @terrajobst As we discussed, this is an incomplete set proposed for initial publication, with more to be added. In order to cover the Reader and Writer, I included the sample code from the blog, so those sections are especially sparse. Links to the staging docs are in the PR description. |
Co-Authored-By: Petr Kulikov <[email protected]>
|
@pkulikov Thanks for the correction! |
mairaw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @tdykstra. I'm approving it but left you a bunch of comments for you to consider before squashing and merging.
| | TemperatureC| 0 | Case-sensitive mismatch (`temperatureC` in the JSON), so the property isn't set. | | ||
| | Summary | Hot || | ||
| | ExtensionData | temperatureC: 25 |Since the case didn't match, this JSON property is an extra and becomes a key-value pair in the dictionary.| | ||
| || DatesAvailable:<br> 8/1/2019 12:00:00 AM -07:00<br>8/2/2019 12:00:00 AM -07:00 |Extra property from the JSON becomes a key-value pair, with an array as the value object.| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first column is empty by default in these two rows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the intent is to represent two additional entries in the Dictionary, rather than two additional properties. I'm open to suggestions for alternative ways of portraying that. The notes explain that intent.
| href: version-tolerant-serialization-technology-sample.md | ||
| - name: Web Services Generics Serialization Technology Sample | ||
| href: web-services-generics-serialization-technology-sample.md | ||
| - name: Serialization Tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change in indentation is not 100% accurate. some of the samples are related to binary serialization too. I think it's fine to indent the serialization tools though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix this in a separate PR
- Retire the link farm doc and redirect its URL to the top-level serialization overview doc.
- Put a Samples node under Binary and XML sections
- Divide up the samples into binary and XML, and add nodes under the appropriate Samples nodes for them.
When we have System.Text.Json samples we'll add a Samples node under the JSON section as well.
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
Co-Authored-By: Maira Wenzel <[email protected]>
|
Btw, here are some samples that might be worth looking through and adding (particularly scenario 4/5 that cover JsonDocument/Element): And here are some more about converters (mainly scenario 4/5 again because the first 3 are about APIs/types we haven't shipped yet): |
Fixes #12207
Internal review URL - Overview
Internal review URL - How to