json parser stuff

This commit is contained in:
Sem van der Hoeven
2020-09-16 12:14:04 +02:00
parent b0dc258455
commit 5699f8678e
2 changed files with 14 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Sockets;
using System.Text;
using Newtonsoft.Json;
@@ -15,7 +16,15 @@ namespace RH_Engine
/// <returns></returns>
public static string[] Parse(string msg)
{
dynamic jsonData = JsonConvert.DeserializeObject(msg);
Newtonsoft.Json.Linq.JArray data = jsonData.data;
foreach (dynamic d in data)
{
Console.WriteLine(d.clientinfo.host);
}
return null;
}