org.codehaus.jettison.json.JSONArray.getJSONArray()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(142)

本文整理了Java中org.codehaus.jettison.json.JSONArray.getJSONArray()方法的一些代码示例,展示了JSONArray.getJSONArray()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSONArray.getJSONArray()方法的具体详情如下:
包路径:org.codehaus.jettison.json.JSONArray
类名称:JSONArray
方法名:getJSONArray

JSONArray.getJSONArray介绍

[英]Get the JSONArray associated with an index.
[中]获取与索引关联的JSONArray。

代码示例

代码示例来源:origin: com.atlassian.jira/jira-rest-java-client-core

valuesToParse = allowedValues.getJSONArray(0);
} else {
  valuesToParse = allowedValues;

代码示例来源:origin: org.openengsb.wrapped/jira-rest-java-client-core

valuesToParse = allowedValues.getJSONArray(0);
} else {
  valuesToParse = allowedValues;

代码示例来源:origin: com.atlassian.jira/jira-rest-java-client-p3

valuesToParse = allowedValues.getJSONArray(0);

代码示例来源:origin: com.atlassian.jira/jira-rest-java-client

valuesToParse = allowedValues.getJSONArray(0);

代码示例来源:origin: org.apache.apex/malhar-library

childJa = ja.getJSONArray(index);
} catch (JSONException ex) {

代码示例来源:origin: org.apache.apex/malhar-library

childJa = ja.getJSONArray(index);
} catch (JSONException ex) {

代码示例来源:origin: com.couchbase.client/couchbase-client

JSONArray rows = source.getJSONArray(i);
short master = (short) rows.getInt(0);
int replicaSize = rows.length() - 1;

代码示例来源:origin: pentaho/pentaho-platform

private static boolean compareArray( JSONArray jsa1, JSONArray jsa2, int i ) throws JSONException {
 KeyType keyType = getKeyType( jsa1, i );
 if ( keyType == getKeyType( jsa2, i ) ) {
  if ( keyType == KeyType.OBJECT ) {
   return jsonEqual( jsa1.getJSONObject( i ), jsa2.getJSONObject( i ), null );
  } else {
   if ( keyType == KeyType.ARRAY ) {
    return jsonEqual( jsa1.getJSONArray( i ), jsa2.getJSONArray( i ), null );
   } else {
    return jsa1.getString( i ).equals( jsa2.getString( i ) );
   }
  }
 }
 return false;
}

代码示例来源:origin: eclipse-ee4j/glassfish

private boolean sameArray(ArrayValue want, JSONArray parent, int index) throws Exception {
  trace("comparing array array element " + index);
  indent();
  try {
    try {
      if (sameArray(want, parent.getJSONArray(index))) {
        trace("same array");
        return true;
      } else {
        trace("different array");
        return false;
      }
    } catch (JSONException e) {
      trace("different since property was not an array");
      return false;
    }
  } finally {
    undent();
  }
}

代码示例来源:origin: org.jspresso.framework/jspresso-swing-application

@Override
 public void valueChange(ValueChangeEvent evt) {
  String mapContent = mapContentConnector.getConnectorValue();
  if (mapContent != null) {
   try {
    JSONObject mapContentAsJson = new JSONObject(mapContent);
    JSONArray markers = mapContentAsJson.optJSONArray(MapHelper.MARKERS_KEY);
    if (markers != null && markers.length() > 0) {
     JSONArray marker = markers.getJSONArray(0);
     mapView.setCenter(marker.getDouble(1), marker.getDouble(0));
     mapView.setVisible(true);
    } else {
     mapView.setVisible(false);
    }
   } catch (JSONException e) {
    throw new ConnectorBindingException(e, "Invalid Json map content");
   }
  } else {
   mapView.setVisible(false);
  }
 }
};

代码示例来源:origin: ORCID/ORCID-Source

PublicationDate publicationDate = new PublicationDate();
try {
  JSONArray dateArray = dateParts.getJSONArray(0);
JSONObject issued = (JSONObject) json.get("issued");
JSONArray dateParts = issued.getJSONArray("date-parts");
JSONArray date = dateParts.getJSONArray(0);

代码示例来源:origin: inchaincodes/inchain

if(sources != null) {
  sourcesList = new ArrayList<String>();
  JSONArray sourcesArray = sources.getJSONArray(i);

相关文章