Пример #1
0
 /// <summary> Get an array of field names from a JSONObject.
 /// 
 /// </summary>
 /// <returns> An array of field names, or null if there are no names.
 /// </returns>
 public static System.String[] getNames(JSONObject jo)
 {
     int length = jo.length();
     if (length == 0)
     {
         return null;
     }
     System.Collections.IEnumerator i = jo.keys();
     System.String[] names = new System.String[length];
     int j = 0;
     while (i.MoveNext())
     {
         names[j] = ((System.String)i.Current);
         j += 1;
     }
     return names;
 }