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

Add Stack<T> converter example #16690

Closed
tdykstra opened this issue Jan 15, 2020 — with docs.microsoft.com · 1 comment · Fixed by #18358
Closed

Add Stack<T> converter example #16690

tdykstra opened this issue Jan 15, 2020 — with docs.microsoft.com · 1 comment · Fixed by #18358
Assignees
Labels
doc-enhancement Improve the current content [org][type][category]

Comments

Copy link
Contributor

tdykstra commented Jan 15, 2020

Add example converter that serializes Stack objects without reversing the order.

#16225 (comment)

Start the new section with text that was in the Migrate doc:

In <xref:System.Text.Json>, the order of a stack's contents is reversed when it's serialized.
This behavior applies to the following types and interface and user-defined types that
derive from them:	
* <xref:System.Collections.Stack>	
* <xref:System.Collections.Generic.Stack%601>	
* <xref:System.Collections.Immutable.ImmutableStack%601>	
* <xref:System.Collections.Immutable.IImmutableStack%601>	
A custom converter could be implemented to keep stack contents in the same order.

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@tdykstra tdykstra added doc-enhancement Improve the current content [org][type][category] and removed ⌚ Not Triaged Not triaged labels Jan 15, 2020
@tdykstra tdykstra self-assigned this Jan 15, 2020
@tdykstra tdykstra added the P1 label Jan 17, 2020
@tdykstra tdykstra changed the title Add Stack\<T> converter example Add Stack<T> converter example Jan 17, 2020
@layomia
Copy link
Contributor

layomia commented Mar 4, 2020

Here's a sample - #16225 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org][type][category]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants