Guest User

Untitled

a guest
Feb 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. Type[] tValueType = typeof(T).GetTypeInfo().GenericTypeArguments;
  2. if (tValueType.Length == 1)
  3. {
  4. ArrayNameAttribute arrayNameAttribute = tValueType[0].GetTypeInfo().GetCustomAttribute<ArrayNameAttribute>();
  5. if (arrayNameAttribute != null)
  6. {
  7. json = JObject.Parse(json).SelectToken(arrayNameAttribute.Name).ToString();
  8. }
  9. }
Add Comment
Please, Sign In to add comment