0

I have a simple JSON array like this :

"{0: "4", 1: "5"}"

How can I deserialize this JSON array in ASP.NET MVC?

1 Answer 1

2

Most ASP.NET MVC applications use the JSON.NET library for that purpose. In that case you would do:

var numbers = JsonConvert.DeserializeObject<List<string>>("{0: \"4\", 1: \"5\"}");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.