public JSONArray names(){
  JSONArray ja=new JSONArray();
  Iterator keys=keys();
  while (keys.hasNext()) {
    ja.put(keys.next());
  }
  return ja.length() == 0 ? null : ja;
}

public JSONArray names ( ) { JSONArray ja = new JSONArray ( ) ; Iterator keys = keys ( ) ; while ( keys . hasNext ( ) ) { ja . put ( keys . next ( ) ) ; } return ja . length ( ) == 0 ? null : ja ; }
produce a jsonarray containing the names of the elements of this jsonobject .
