Skip to content

Tuple support in System.Text.Json.Serializer? #552

Closed

Description

@kaamil1984

Can we have tuple support in System.Text.Json.Serializer?

General

Is there any chance, that we can have tuple support in System.Text.Json.Serializer?

I would like to serialize and deserialize object like this:

(int Result, string SuccessMessage, string ErrorMessage) MyTuple;

Activity

  1. transferred this issue fromdotnet/coreon Dec 5, 2019
  2. added
    untriaged
    on Dec 5, 2019
  3. GrabYourPitchforks commented on Dec 5, 2019

    @GrabYourPitchforks
    Member

    Possibly related to feature work to allow serializing fields, not just properties? Though one could certainly imagine a custom converter for ValueTuple<...> that doesn't need a full-fledged field serialization feature.

  4. added this to the 5.0 milestone on Dec 5, 2019
  5. removed
    untriaged
    on Dec 14, 2019
  6. layomia commented on Dec 14, 2019

    @layomia
    Contributor
  7. ahsonkhan commented on Jan 9, 2020

    @ahsonkhan
    Contributor

    I mention a workaround for ValueTuples (up to 3) based on custom converters if folks need it.
    #1519 (comment)

  8. ghost locked as resolved and limited conversation to collaborators on Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions