Create the appropriate classes:
public class NameOfPerson
{
public object preNominalLetters { get; set; }
public object initials { get; set; }
public string firstName { get; set; }
public object middleName { get; set; }
public string lastName { get; set; }
public object postNominalLetters { get; set; }
}
public class ProfilePhoto
{
public object guid { get; set; }
public string profilePhotoUrl { get; set; }
public bool useOwnProfilePhoto { get; set; }
}
public class Client
{
public string accountId { get; set; }
public NameOfPerson nameOfPerson { get; set; }
public string email { get; set; }
public ProfilePhoto profilePhoto { get; set; }
public int clientType { get; set; }
}
public class Attributes
{
public List<Client> clients { get; set; }
}
public class Data
{
public string type { get; set; }
public Attributes attributes { get; set; }
}
public class RootObject
{
public Data data { get; set; }
}
(I used
json2csharp - generate c# classes from json[
^] to get those) and then just cast the result to the root class. You can then access the data in the normal way.
I prefer Newtonsoft JSON (
Json.NET - Newtonsoft[
^]) - it just seems a little easier to use to me.