C# - deserialize JSON into ValueTuple
问题 I'm trying to deserialize [{"foo": "1", "bar": false}, {"foo": "2", "bar": false}] into List<(string, bool)> type: JsonConvert.DeserializeObject<List<(string foo, bool bar)>>(json) But always get a list of default values - (null, false) . How can I achieve correct deserializing? P.S. I'm not interested in any model/class for that purpose. I need exactly value tuple instead. 回答1: The C# tuple feature was created to represent sets of values, not entities. The names of the values are like the