A
Size: a a a
A
LU
LU
LU
public class SocketSubscribe<T>
{
public SocketSubscribe()
{
}
public SocketSubscribe(int id, string method, T @params)
{
Params = @params;
Id = id;
Method = method;
}
[JsonProperty("id")]
public int? Id { get; set; }
[JsonProperty("params")]
public T Params { get; set; }
[JsonProperty("method")]
public string Method { get; set; }
}
public class GenericParams
{
public bool IsFull { get; set; }
public Dictionary<string, object[]> Update { get; set; }
public string Description { get; set; }
}
LU
JsonConvert.DeserializeObject<SocketSubscribe<GenericParams>>(json)
AM
public class KrasyvyGeneric<T>: Dictionary<string,T> where T: KrasyvyGeneric<T>, new {
...
}
LU
public class KrasyvyGeneric<T>: Dictionary<string,T> where T: KrasyvyGeneric<T>, new {
...
}
LU
public class KrasyvyGeneric<T>: Dictionary<string,T> where T: KrasyvyGeneric<T>, new {
...
}
AM
NK
AM
vl
{"method":"update","params":[false,{"key1":[["0.022622","0.171"],["0.022619","0.001"]],"key2":[["0.022719","0.011"],["0.023107","300.3"]]},"description"],"id":42}
method
и id
, params
тоже есть у всех, но внутри там набор разнородных объектов. и пытаться разобрать даже просто как object[]
эти параметры не получаетсяvl
AM
vl
LU
vl
vl
LU
vl
foreach (var jsonToken in list)
{
if (jsonToken.Type == JsonTokenType.Boolean)
{
bool value = jsonToken.Value<bool>();
}
else if (...)
}