A free and open-source web framework that enables developers to create web apps using C# and HTML, developed by Microsoft.
Hi @Kalyan A,
Firstly, your razor contains duplicated @page "/" in Index.razor.
Then, the issue with the provided JSON string is that there is an extra set of curly braces {} inside the array. Besides, the decimal type data surrounded with "" is invalid, you need remove it.
The correct json should be:
string jsonString = @"[
{
""CD"": ""1003"",
""METS"": 14, //remove the """"
""CATEGORY"": ""bicycling"",
""DESC"": ""bicycling, mountain, uphill, vigorous""
},
{
""CD"": ""1004"",
""METS"": 16, //remove the """"
""CATEGORY"": ""bicycling"",
""DESC"": ""bicycling, mountain, competitive, racing""
}
]
";
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Rena