Package org.codehaus.jettison.json

Examples of org.codehaus.jettison.json.JSONArray.opt()


                    }
                } else if(jValue instanceof JSONArray){
                    //parse value list
                    JSONArray jValueArray = (JSONArray)jValue;
                    for(int j=0;j<jValueArray.length();j++){
                        jValue = jValueArray.opt(j);
                        if(jValue instanceof JSONObject){
                            //Reconciliation data available!
                            ReconcileValue value = parseValueFromV(jValue, nsPrefixService);
                            if(value != null){
                                values.add(value);
View Full Code Here


        final JSONArray jsonArray = RestHelper.getResultArray(buildUri(directionReturnToken));

        final List<Object> list = new ArrayList<Object>();
        for (int ix = 0; ix < jsonArray.length(); ix++) {
            list.add(jsonArray.opt(ix));
        }

        return list;
    }
View Full Code Here

                    }
                } else if(jValue instanceof JSONArray){
                    //parse value list
                    JSONArray jValueArray = (JSONArray)jValue;
                    for(int j=0;j<jValueArray.length();j++){
                        jValue = jValueArray.opt(j);
                        if(jValue instanceof JSONObject){
                            //Reconciliation data available!
                            ReconcileValue value = parseValueFromV(jValue);
                            if(value != null){
                                values.add(value);
View Full Code Here

        Assert.assertNotNull(converted);
        Assert.assertEquals(3, converted.length());

        Assert.assertEquals("x", converted.get(0));
        Assert.assertNull(converted.opt(1));
        Assert.assertEquals("y", converted.get(2));
    }

    @Test
    public void convertIteratorPaged() throws Exception {
View Full Code Here

            } else if (propertyValue instanceof JSONArray) {
                JSONArray innerJson = (JSONArray) propertyValue;
                ArrayList typedItems = new ArrayList();

                for (int ix = 0; ix < innerJson.length(); ix++) {
                    typedItems.add(getTypedPropertyValue(innerJson.opt(ix), parseTypes));
                }

                typedPropertyValue = typedItems;
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.