[go: nahoru, domu]

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

No mention of struct serialization? #42877

Open
fterrani opened this issue Oct 8, 2024 · 3 comments
Open

No mention of struct serialization? #42877

fterrani opened this issue Oct 8, 2024 · 3 comments
Assignees
Labels
dotnet-fundamentals/svc Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest. ⌚ Not Triaged Not triaged

Comments

@fterrani
Copy link
fterrani commented Oct 8, 2024

Type of issue

Missing information

Description

Since struct serialization wasn't always supported, it would be nice to officially state that it now is, e.g. in the Serialization behavior section.

Page URL

https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/how-to

Content source URL

https://github.com/dotnet/docs/blob/main/docs/standard/serialization/system-text-json/how-to.md

Document Version Independent Id

002f9f2a-48d1-0671-a079-b99b9f6bab58

Article author

@gewarren

Metadata

  • ID: 588ae32f-3429-143f-824c-5ab2d046d24a
  • Service: dotnet-fundamentals

Related Issues


Associated WorkItem - 340223

@issues-automation issues-automation bot added dotnet-fundamentals/svc Pri1 High priority, do before Pri2 and Pri3 labels Oct 8, 2024
@dotnetrepoman dotnetrepoman bot added the ⌚ Not Triaged Not triaged label Oct 8, 2024
@fterrani
Copy link
Author
fterrani commented Oct 8, 2024

Adding an (tiny) example with a struct could also be worth considering.

@gewarren
Copy link
Contributor

@eiriktsarpalis Can you weigh in?

@eiriktsarpalis
Copy link
Member

We have a supported collection types article already but not a general "supported types". Perhaps it makes sense to generalize it and include explicit mention of all supported kinds, roughly:

Serializing as JSON objects

The following types serialize as JSON objects unless they implement IEnumerable<T>

  • Classes
  • Structs
  • Interfaces
  • Records and struct records

Serializing as JSON arrays

(insert existing content about collection types)

Unupported types

  • System.Type and System.Reflection.MemberInfo
  • ReadOnlySpan<T> , Span<T> and ref structs in general
  • Delegate types
  • IntPtr and UIntPtr.

@gewarren gewarren self-assigned this Oct 25, 2024
@gewarren gewarren added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Nov 4, 2024
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fundamentals/svc Pri1 High priority, do before Pri2 and Pri3 📌 seQUESTered Identifies that an issue has been imported into Quest. ⌚ Not Triaged Not triaged
Projects
Status: 🔖 Ready
Development

No branches or pull requests

3 participants