how do i parse string or extract text that lies between multi parentheses, colon, brackets, semi colon and much more special characters in c# ASP.Net
string 1:
{"ErrorCode":"000","ErrorMessage":"Success","JobId":"41099374",
"MessageData":[{"Number":"9999999999","MessageId":"JY15wKCbkkCZSEUssGRgmg"}]}
string 2:
{"ErrorCode":"21","ErrorMessage":"insufficient credits","JobId":null,"MessageData":null}
Requirements: i want to fetch all the values
examle: ErrorCode = 000
please help me.
One way to deserialize this, using
Newtonsoft.Json
Nuget package, is like this:Another way can be to use splits and loops but it will be tricky when you have collections...