Examples of optString()


Examples of org.json_voltpatches.JSONObject.optString()

        boolean truncation = jsonObj.getBoolean("isTruncation");
        boolean didSucceed = jsonObj.getBoolean("didSucceed");
        // A truncation request ID is not always provided. It's used for
        // snapshots triggered indirectly via ZooKeeper so that the
        // triggerer can recognize the snapshot when it finishes.
        String truncReqId = jsonObj.optString("truncReqId");

        if (hostCount == 0) {
            /*
             * Convert the JSON object containing the export sequence numbers for each
             * table and partition to a regular map
View Full Code Here

Examples of org.mapfish.print.wrapper.json.PJsonObject.optString()

        MapPrinter mapPrinter = this.printerFactory.create(appId);
        PJsonObject updatedSpecJson = null;
        try {
            updatedSpecJson = OldAPIRequestConverter.convert(specJson, mapPrinter.getConfiguration());

            String format = updatedSpecJson.optString(MapPrinterServlet.JSON_OUTPUT_FORMAT, "pdf");
            final String jobReferenceId = this.primaryApiServlet.createAndSubmitPrintJob(appId, format,
                    updatedSpecJson.getInternalObj().toString(), httpServletRequest,
                    httpServletResponse);
            boolean isDone = false;
            while (!isDone) {
View Full Code Here

Examples of org.richfaces.json.JSONObject.optString()

                User newUser = new User();

                newUser.setgPlusId(gPlusId);
                newUser.setFirstName(userInfo.getJSONObject("name").getString("givenName"));
                newUser.setSecondName(userInfo.getJSONObject("name").getString("familyName"));
                newUser.setEmail(userInfo.optString("email", "mail@mail.com"));

                String username = userInfo.optString("nickname", newUser.getFirstName());
                newUser.setLogin(username);

                String sex = userInfo.getString("gender");
View Full Code Here

Examples of org.richfaces.json.JSONObject.optString()

                newUser.setgPlusId(gPlusId);
                newUser.setFirstName(userInfo.getJSONObject("name").getString("givenName"));
                newUser.setSecondName(userInfo.getJSONObject("name").getString("familyName"));
                newUser.setEmail(userInfo.optString("email", "mail@mail.com"));

                String username = userInfo.optString("nickname", newUser.getFirstName());
                newUser.setLogin(username);

                String sex = userInfo.getString("gender");
                newUser.setSex(sex.equals("male") ? Sex.MALE : Sex.FEMALE);
View Full Code Here

Examples of org.richfaces.json.JSONObject.optString()

                String sex = userInfo.getString("gender");
                newUser.setSex(sex.equals("male") ? Sex.MALE : Sex.FEMALE);

                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                String birthday = userInfo.optString("birthday", "1900-01-01");
                newUser.setBirthDate(sdf.parse(birthday));

                // random password, the user will not be using this to log in
                newUser.setPasswordHash(HashUtils.hash("gPlus" + System.currentTimeMillis()));
View Full Code Here

Examples of org.slim3.repackaged.org.json.JSONObject.optString()

    @Override
    public String readProperty(String name){
        JSONObject o = object.optJSONObject(this.name);
        if(o == null) return null;
        return o.optString(name, null);
    }

    private JSONObject object;
    private String name;
}
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.