Json2CSharp / Json2CSharpCodeGenerator

Microsoft Reciprocal License
292 stars 81 forks source link

convert a jSON array. Incorrect deserialize documentation. JSON->C# #106

Open toakeley opened 10 months ago

toakeley commented 10 months ago

convert this JSON->C# [ {"ID_DO_Login":14, "firstname":"Timothy from Perth","lastname":"Simons" }, {"ID_DO_Login":42, "firstname":"Blake","lastname":"jim" } ]

We get this .. // Root myDeserializedClass = JsonConvert.DeserializeObject<List>(myJsonResponse); public class Root { public int ID_DO_Login { get; set; } public string firstname { get; set; } public string lastname { get; set; } }

The correct Documentation comment should be this.. // List< Root> myDeserializedClass = JsonConvert.DeserializeObject<List>(myJsonResponse);

toakeley commented 10 months ago

// Root myDeserializedClass = JsonConvert.DeserializeObject<List>(myJsonResponse);

should be

// List< Root> myDeserializedClass = JsonConvert.DeserializeObject<List>(myJsonResponse);

toakeley commented 10 months ago

Grr.. image