-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Description
Add example converter that serializes Stack objects without reversing the order.
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.
- ID: 5de37d79-751f-e372-e866-efde28f4908c
- Version Independent ID: 678c4f23-764a-7ccd-0d6d-159a30957477
- Content: How to write custom converters for JSON serialization - .NET
- Content Source: docs/standard/serialization/system-text-json-converters-how-to.md
- Product: dotnet
- GitHub Login: @tdykstra
- Microsoft Alias: tdykstra
Metadata
Metadata
Assignees
Labels
No labels