# .NET and More > C# >  Getting JSON values from data

## ubkra

I've got this code to post my username and password to my website. When I enter correct details I get JSON data back



```

{"Userlevel":3,"LoggedIn":true} 



```

How can I use this JSON code? it's just a string of text



```
using (var client = new HttpClient())
        {
            var targetAdd = new Uri("https://www.mydomain.com/login.php");

            var userDetails = new userDetails()
            {
                _username = userName.Text,
                _password = password.Text,
                _isLoggedIn = false,
                _userLevel = 0,
                _userId = 0,
                _userFullName = ""
            };

            string json = JsonSerializer.Serialize(userDetails);


            var payload = new StringContent(json, Encoding.UTF8, "application/json");

            var result = client.PostAsync(targetAdd, payload).Result.Content.ReadAsStringAsync().Result.ToString();
            rubbish.Text = result.ToString();


        }
```

----------

