Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
#json # asp.net
Hi everyone, I have a web service that gives me a json with this format:
in case of positive login ["67", 1];
in the negative: ["fail", "Data entered for the user is incorrect."]


how to properly deserialize?

thank you all

What I have tried:

i try with :
VB
Dim ser As New JavaScriptSerializer()
Dim result = ser.Deserialize(Of LoginResult)(wsResult.ToString())

Public Class LoginResult
   Public Property idcliente As String
   Public Property idutente As String
End Class
Posted
Updated 13-Nov-17 23:35pm

1 solution

I ran your JSON sample through JSON Formatter & Validator[^] and it validates okay.

Working with JSON in C# & VB[^] was written to answer questions like this one. Everything that you need to know is found in the article.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900