Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Processing JSON response in an ASP.NET webform

I'm sending an HTTPWebRequest to a service and they are returning a userid in JSON.

They are returning:

{"id: 123456"}

How do I process this? Should I just do a split on the : and take the second element or is there a proper way of doing this?

like image 273
Jack Marchetti Avatar asked May 16 '26 13:05

Jack Marchetti


1 Answers

you can do that or use a json serializer to deserialize it

if you are using .net 3.5 have a look at system.web.script.serialization.javascriptserializer

like image 194
Hannoun Yassir Avatar answered May 18 '26 08:05

Hannoun Yassir