79572274

Date: 2025-04-14 02:54:09
Score: 1
Natty:
Report link

Refer System.Text.Json.JsonSerializer instead of newton soft json serializer... Sorry Dinesh I had to repeat your answer as I couldn't upvote... But I tested it and it worked like a charm

class OTPData{ public string OTP {get;set} ....... }

var result = System.Text.Json.JsonSerializer.Deserialize<OTPData> 
(response.ToString());

string otp = result.OTP;
string username = result.UserName;
string type = result.type;
Reasons:
  • Blacklisted phrase (0.5): upvote
  • Blacklisted phrase (1): worked like a charm
  • Whitelisted phrase (-1): it worked
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Kaustav Das