Package org.json.simple

Examples of org.json.simple.JSONArray.toArray()


                    JSONArray initScripts = (JSONArray) conf.get(JaggeryCoreConstants.JaggeryConfigParams.INIT_SCRIPTS);
                    if (initScripts != null) {
                        JaggeryContext sharedContext = WebAppManager.sharedJaggeryContext(servletContext);
                        ScriptableObject sharedScope = sharedContext.getScope();

                        Object[] scripts = initScripts.toArray();
                        for (Object script : scripts) {
                            if (!(script instanceof String)) {
                                log.error("Invalid value for initScripts in jaggery.conf : " + script);
                                continue;
                            }
View Full Code Here


        String json = getBody();
        Object obj = JSONValue.parse(json);

        if (obj instanceof JSONArray) {
            JSONArray array = (JSONArray) obj;
            addEdits(path, (JSONObject[]) array.toArray(new JSONObject[0]));
        } else {
            addEdits(path, (JSONObject) obj);
        }
    }
View Full Code Here

                sendError(RMIFault.ITF_ID_NOT_FOUND);
                return;
            }

            try {
                sendResult(interf.invoke(method, params.toArray()));
            } catch (InvocationTargetException e) {
              Throwable target = e.getTargetException();
              if(target instanceof Exception) {
                sendException((Exception) target);
              } else {
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.