code: public JSONArray names() {
          return nameValuePairs.isEmpty()
                  ? null
                  : new JSONArray(new ArrayList<String>(nameValuePairs.keySet()));
      }
docs: Returns an array containing the string names in this object. This method
  returns null if this object contains no mappings.