Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Type[] tValueType = typeof(T).GetTypeInfo().GenericTypeArguments;
- if (tValueType.Length == 1)
- {
- ArrayNameAttribute arrayNameAttribute = tValueType[0].GetTypeInfo().GetCustomAttribute<ArrayNameAttribute>();
- if (arrayNameAttribute != null)
- {
- json = JObject.Parse(json).SelectToken(arrayNameAttribute.Name).ToString();
- }
- }
Add Comment
Please, Sign In to add comment