Code example for Map

Methods: containsKey, get

0
         
        writer.key(propertyID);
        writer.array();
        { 
            if (!expectedTypeID.startsWith("/type/")  // not literal
                    || "/type/key".equals(expectedTypeID)) {
                writer.object();
                writer.key("optional"); writer.value(true);
                 
                boolean hasLimit = false;
                if (node.has("constraints") && !node.isNull("constraints")) {
                    JSONObject constraints = node.getJSONObject("constraints");
                     
                    String[] names = JSONObject.getNames(constraints);
                    for (String name : names) {
                        Object value = constraints.get(name);
                        if (name.equals("limit")) {
                            hasLimit = true;
                        } 
                         
                        if (!name.contains(":") &&
                            !name.equals("limit") &&
                            !name.equals("optional") &&
                            !name.equals("count") &&
                            !name.equals("estimate-count") &&
                            !name.equals("sort") &&
                            !name.equals("return")) {
                             
                            if (name.startsWith("!")) {