I am trying to figure out how to check if I have a Dictionary or Single value like Guid in a List. Tried Type but only define the Array or Object, anybody has any suggestions?
JArray P = R as JArray;
try
{
JTokenType Type = P.Type;
Result = P.ToObject<List<Dictionary<string, object>>>();
}
catch (Exception e)
{
}
Quick and dirty I thought about to catch the error, but not a nice sight.
Seems info was not correct, the objects are
List<SomeClass>
or
List<Guid>
Example data:
[
{
"Id": "45c41ef8-a030-4480-820d-5bd6bf02bf14",
"UserId": "246fef1a-e85e-49be-9aad-7d32c8144580",
"Type": 351208,
"Name": "*******il.com",
"isDirect": true,
"Active": true,
"History": []
}
]
or
["b0d2dd7d-018c-43ad-9c70-8ec9a3f41978"]