Ho il seguente ...
JArray clients = (JArray)clientsParsed["objects"];
foreach (JObject item in clients.Children())
{
// etc.. SQL params stuff...
command.Parameters["@MyParameter"].Value = JTokenToSql(item["thisParameter"]);
}
JTokenToSql
Somiglia a questo...
public static object JTokenToSql(JToken obj)
{
if (obj.Any())
return (object)obj;
else
return (object)DBNull.Value;
}
Ho provato ((JObject)obj).Count
anche .. Ma non sembra funzionare.