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

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

Open
toakeley opened this issue Aug 24, 2023 · 2 comments · May be fixed by #121
Open

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

toakeley opened this issue Aug 24, 2023 · 2 comments · May be fixed by #121

Comments

@toakeley
Copy link

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
Copy link
Author

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

should be

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

@toakeley
Copy link
Author

Grr..
image

@phamduylong phamduylong linked a pull request Nov 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant