Package org.openfaces.org.json

Examples of org.openfaces.org.json.JSONObject.opt()


        TimetableEvent[] targetArray = new TimetableEvent[arrayLength];
        for (int i = 0; i < arrayLength; i++) {
            JSONObject eventObj = (JSONObject) array.get(i);

            TimetableEvent event = new TimetableEvent();
            event.setId((String) eventObj.opt("id"));
            event.setName(eventObj.getString("name"));
            event.setDescription(eventObj.getString("description"));
            if (!eventObj.isNull("resourceId"))
                event.setResourceId(eventObj.getString("resourceId"));
            String startStr = eventObj.getString("startStr");
View Full Code Here


                event.setResourceId(eventObj.getString("resourceId"));
            String startStr = eventObj.getString("startStr");
            event.setStart(DataUtil.parseDateTimeFromJs(startStr, timeZone));
            String endStr = eventObj.getString("endStr");
            event.setEnd(DataUtil.parseDateTimeFromJs(endStr, timeZone));
            Object colorObj = eventObj.opt("color");
            String colorStr = JSONObject.NULL != colorObj ? (String) colorObj : null;
            event.setColor(CSSUtil.parseColor(colorStr));
            JSONObject customPropertiesObj = eventObj.optJSONObject("customProperties");
            if (customPropertiesObj != null) {
                for (Iterator<String> keys = customPropertiesObj.keys(); keys.hasNext();) {
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.