本文整理汇总了Java中com.ibm.json.java.JSONArray.listIterator方法的典型用法代码示例。如果您正苦于以下问题:Java JSONArray.listIterator方法的具体用法?Java JSONArray.listIterator怎么用?Java JSONArray.listIterator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ibm.json.java.JSONArray
的用法示例。
在下文中一共展示了JSONArray.listIterator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Message
import com.ibm.json.java.JSONArray; //导入方法依赖的package包/类
/**
*
* @author Doug
* {
* "code":"Revit-MissingLink",
* "type":"warning",
* "message":
* [
* "<message>Missing link files: <ul>{0}<\/ul><\/message>",
* "NE Corner Building 6.dwg"
* ]
* }
*/
Message(
JSONObject jObj
) {
if( jObj != null )
{
Object value = jObj.get( KEY_CODE );
if( value != null && value instanceof String )
{
_code = (String)value;
}
value = jObj.get( KEY_TYPE );
if( value != null && value instanceof String )
{
_type = (String)value;
}
value = jObj.get( KEY_MESSAGE );
if (value != null && value instanceof JSONArray )
{
JSONArray jArray = (JSONArray)value;
_messages = new String[ jArray.size() ];
@SuppressWarnings( "rawtypes" )
Iterator itr = jArray.listIterator();
int i = 0;
while( itr.hasNext() )
{
value = itr.next();
if( value instanceof String )
{
_messages[i++] = (String)value;
}
}
}
}
}
示例2: BucketDescription
import com.ibm.json.java.JSONArray; //导入方法依赖的package包/类
public BucketDescription(
JSONObject jObj
) {
Object value = jObj.get( KEY_BUCKET_KEY );
if( value != null && value instanceof String )
{
_bucketKey = (String)value;
}
else
{
value = jObj.get( KEY_KEY );
if( value != null && value instanceof String )
{
_bucketKey = (String)value;
}
}
value = jObj.get( KEY_OWNER );
if( value != null && value instanceof String )
{
_owner = (String)value;
}
value = jObj.get( KEY_CREATE_DATE );
if( value != null && value instanceof Long )
{
_createDate = new Date( (Long)value );
}
value = jObj.get( KEY_POLICY_KEY );
if( value != null && value instanceof String )
{
_policyKey = (String)value;
}
value = jObj.get( KEY_PERMISSIONS );
if( value != null && value instanceof String )
{
_policyKey = (String)value;
}
value = jObj.get( KEY_PERMISSIONS );
if (value != null && value instanceof JSONArray )
{
JSONArray jArray = (JSONArray)value;
_permissions = new Permission[ jArray.size() ];
@SuppressWarnings( "rawtypes" )
Iterator itr = jArray.listIterator();
int i = 0;
while( itr.hasNext() )
{
value = itr.next();
if( value instanceof JSONObject )
{
_permissions[i++] = new Permission( (JSONObject)value );
}
}
}
}