Package net.minidev.json

Examples of net.minidev.json.JSONObject.containsKey()


       
        JSONObject jsonObject = httpResponse.getContentAsJSONObject();

        code = JSONObjectUtils.getString(jsonObject, "error");

        if (jsonObject.containsKey("error_description"))
          description = JSONObjectUtils.getString(jsonObject, "error_description");
      }
     
      error = new ErrorObject(code, description, httpResponse.getStatusCode());
    }
View Full Code Here


        try {
          JSONObject entrySpec = (JSONObject)member.getValue();

          ClaimRequirement requirement = ClaimRequirement.VOLUNTARY;

          if (entrySpec.containsKey("essential")) {

            boolean isEssential = (Boolean)entrySpec.get("essential");

            if (isEssential)
              requirement = ClaimRequirement.ESSENTIAL;
View Full Code Here

            if (isEssential)
              requirement = ClaimRequirement.ESSENTIAL;
          }

          if (entrySpec.containsKey("value")) {

            String expectedValue = (String)entrySpec.get("value");

            entries.add(new Entry(claimName, requirement, langTag, expectedValue));
View Full Code Here

            String expectedValue = (String)entrySpec.get("value");

            entries.add(new Entry(claimName, requirement, langTag, expectedValue));

          } else if (entrySpec.containsKey("values")) {

            List<String> expectedValues = new LinkedList<>();

            for (Object v: (List)entrySpec.get("values")) {
View Full Code Here

    JSONObject jsonObject = httpRequest.getQueryAsJSONObject();

    // Extract the software statement if any
    SignedJWT stmt = null;

    if (jsonObject.containsKey("software_statement")) {

      try {
        stmt = SignedJWT.parse(JSONObjectUtils.getString(jsonObject, "software_statement"));

      } catch (java.text.ParseException e) {
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.