using System.Collections.Generic; using Newtonsoft.Json.Linq; namespace MelonVPNCore { public static class ClientListParser { public static ConnectedClient[] Parse(string json) { List clients = new List(); JArray a = JArray.Parse(json); foreach (JObject o in a.Children()) { clients.Add(new ConnectedClient(o.GetValue("Name").ToString(), o.GetValue("IP").ToString())); } return clients.ToArray(); } } }