Package net.minidev.json

Examples of net.minidev.json.JSONArray.toArray()


        final DlsPermission dlsPerm = new DlsPermission();
        dlsPerm.setField(field);

        JSONArray ja = (JSONArray) ((JSONObject) dlsPermission
            .get(field)).get("read");
        dlsPerm.addReadTokens(ja.toArray(new String[0]));

        ja = (JSONArray) ((JSONObject) dlsPermission.get(field))
            .get("update");
        dlsPerm.addUpdateTokens(ja.toArray(new String[0]));
View Full Code Here


            .get(field)).get("read");
        dlsPerm.addReadTokens(ja.toArray(new String[0]));

        ja = (JSONArray) ((JSONObject) dlsPermission.get(field))
            .get("update");
        dlsPerm.addUpdateTokens(ja.toArray(new String[0]));

        ja = (JSONArray) ((JSONObject) dlsPermission.get(field))
            .get("delete");
        dlsPerm.addDeleteTokens(ja.toArray(new String[0]));
View Full Code Here

            .get("update");
        dlsPerm.addUpdateTokens(ja.toArray(new String[0]));

        ja = (JSONArray) ((JSONObject) dlsPermission.get(field))
            .get("delete");
        dlsPerm.addDeleteTokens(ja.toArray(new String[0]));

        perms.add(dlsPerm);
      }

    }
View Full Code Here

      throws ParseException {

    JSONArray jsonArray = getJSONArray(o, key);

    try {
      return jsonArray.toArray(new String[0]);

    } catch (ArrayStoreException e) {

      throw new ParseException("JSON object member with key \"" + key + "\" is not an array of strings", 0);
    }
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.