Ejemplo n.º 1
0
 public static dynamic GetValue(dynamic item)
 {
     if (item is IDictionary <string, dynamic> )
     {
         item = new DynamicJsonObject(item as IDictionary <string, dynamic>);
     }
     else if (item is ArrayList && (item as ArrayList).Count > 0 && (item as ArrayList)[0] is IDictionary <string, dynamic> )
     {
         item = new DynamicJsonArray(item);
     }
     else if (item is ArrayList)
     {
         item = new List <dynamic>((item as ArrayList).ToArray());
     }
     return(item);
 }
Ejemplo n.º 2
0
 public static dynamic GetValue(dynamic item)
 {
     if (item is IDictionary<string, dynamic>)
     {
         item = new DynamicJsonObject(item as IDictionary<string, dynamic>);
     }
     else if (item is ArrayList && (item as ArrayList).Count > 0 && (item as ArrayList)[0] is IDictionary<string, dynamic>)
     {
         item = new DynamicJsonArray(item);
     }
     else if (item is ArrayList)
     {
         item = new List<dynamic>((item as ArrayList).ToArray());
     }
     return item;
 }