Code example for JSONObject: Parsing JSON documents

Methods: getJSONObjecthasisNull

0
             
            path2 = new ArrayList<String>(path);
            path2.add(obj.getString("id"));
        } 
         
        if (obj.has("properties") && !obj.isNull("properties")) {
            boolean included = (obj.has("included") && obj.getBoolean("included"));
            if (included && columns != null) {
                JSONObject expected = obj.getJSONObject("expected");
                 
                columns.add(new ColumnInfo(names2, path2, 
                    new FreebaseType(expected.getString("id"), expected.getString("name"))));
            } 
             
            return (included ? 1 : 0) + 
                countColumns(obj.getJSONArray("properties"), columns, names2, path2);
        } else { 
            if (columns != null) {
                JSONObject expected = obj.getJSONObject("expected");
                 
                columns.add(new ColumnInfo(names2, path2,
                    new FreebaseType(expected.getString("id"), expected.getString("name"))));
            } 
            return 1; 
Stop searching for code, let great code find you!  Add Codota to your java IDE