Skip to content

Conversation

@tdykstra
Copy link
Contributor

@tdykstra tdykstra commented Sep 4, 2019

@tdykstra tdykstra changed the title JSON Serialization docs WIP JSON Serialization docs Sep 4, 2019
@tdykstra tdykstra changed the title WIP JSON Serialization docs JSON Serialization docs Sep 5, 2019
@tdykstra
Copy link
Contributor Author

tdykstra commented Sep 5, 2019

@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]>
@tdykstra
Copy link
Contributor Author

tdykstra commented Sep 6, 2019

@pkulikov Thanks for the correction!

Copy link
Contributor

@mairaw mairaw left a 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.|
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Contributor

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

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'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.

@tdykstra tdykstra merged commit eafbee0 into dotnet:master Sep 14, 2019
@tdykstra tdykstra deleted the stj branch September 14, 2019 01:35
@ahsonkhan
Copy link
Contributor

ahsonkhan commented Sep 14, 2019

Btw, here are some samples that might be worth looking through and adding (particularly scenario 4/5 that cover JsonDocument/Element):
https://github.com/ahsonkhan/JsonUserStudy/tree/master/UxScenarios

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):
https://github.com/kasiabulat/json-ux-study-answers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON serialization with .NET Core 3.0

4 participants