Click here to Skip to main content
15,888,816 members
Please Sign up or sign in to vote.
2.67/5 (2 votes)
See more:
Heloo,

Here am developing the code for login with google plus. Here the data is coming in json format.

But i want to convert that json format to normal string format. Please help me.

Here this is my url:

String URI = "https://www.googleapis.com/oauth2/v1/userinfo?access_token=" + Request.QueryString["access_token"].ToString();

from this url am getting the data.

WebClient webClient = new WebClient();
Stream stream = webClient.OpenRead(URI);
string b;


Here i want to get the data from that url in string format. Please help me.
Posted

1 solution

Might be the easiest way,
C#
using(WebClient client = new WebClient()) 
{
   string s = client.DownloadString(url);
}


-KR
 
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