示例#1
0
 /**
  * Construct a JSONObject from a subset of another JSONObject. An array of strings is used to
  * identify the keys that should be copied. Missing keys are ignored.
  *
  * @param jo A JSONObject.
  * @param sa An array of strings.
  * @throws JSONException If a value is a non-finite number.
  */
 public JSONObject(JSONObject jo, String[] sa) throws JSONException {
   this();
   for (int i = 0; i < sa.length; i += 1) {
     putOpt(sa[i], jo.opt(sa[i]));
   }
 }