Answer a JSON representation of the available domains in the database
@return
351618
public String getDomains() {
		StringWriter sw = new StringWriter();
		JsonGenerator generator;
		if (this.prettyFormat != Format.NONE) {
			JsonGeneratorFactory gf = JSONWriter.getPrettyGeneratorFactory();
			generator = gf.createGenerator(sw);
		} else
			generator = Json.createGenerator(sw);
		
		generator.writeStartArray();
		List<String> doms = DomainInformation.availableDomains(dbAccess);
		for (String dom : doms) {
			generator.write(dom);
		}
		generator.writeEnd();

		generator.flush();
		return sw.toString();
	}
362087
private String kekMaterialDescAsJson() {
        Map<String, String> kekMaterialDesc = getKEKMaterialsDescription();
        if (kekMaterialDesc == null)
            kekMaterialDesc = Collections.emptyMap();
        return Jackson.toJsonString(kekMaterialDesc);
    }
620841
protected Map jsonMap() {
        checkJsonContentType();
        try {
            return JsonHelper.toMap(getRequestString());
        } catch (IOException e) {
            throw new WebException(e);
        }
    }
1083534
public String toJson() {
		StringBuilder json = new StringBuilder("");
		
		json.append("{");
		json.append("\"groupvertexid\": \"" + this.getID() + "\",");
		json.append("\"groupvertexname\": \"" + StringUtils.escapeHtml(this.getName()) + "\",");
		json.append("\"numberofgroupmembers\": " + this.getNumberOfGroupMembers() + ",");
		json.append("\"groupmembers\": [");
		
		// Count state status of group members
		Map<ExecutionState, Integer> stateCounts = new HashMap<ExecutionState, Integer>();
		
		// initialize with 0
		for (ExecutionState state : ExecutionState.values()) {
			stateCounts.put(state, new Integer(0));
		}
		
		for(int j = 0; j < this.getNumberOfGroupMembers(); j++) {
			ManagementVertex vertex = this.getGroupMember(j);
			
			json.append(vertex.toJson());
			
			// print delimiter
			if(j != this.getNumberOfGroupMembers() - 1) {
				json.append(",");
			}
			
			// Increment state status count
			Integer count =  stateCounts.get(vertex.getExecutionState()) + new Integer(1);
			stateCounts.put(vertex.getExecutionState(), count);
		}
		json.append("],");
		json.append("\"backwardEdges\": [");
		
		for(int edgeIndex = 0; edgeIndex < this.getNumberOfBackwardEdges(); edgeIndex++) {
			ManagementGroupEdge edge = this.getBackwardEdge(edgeIndex);
			
			json.append("{");
			json.append("\"groupvertexid\": \"" + edge.getSource().getID() + "\",");
			json.append("\"groupvertexname\": \"" +  StringUtils.escapeHtml(edge.getSource().getName()) + "\",");
			json.append("\"channelType\": \"" +  edge.getChannelType() + "\"");
			json.append("}");
			
			// print delimiter
			if(edgeIndex != this.getNumberOfBackwardEdges() - 1) {
				json.append(",");
			}
		}
		json.append("]");
		
		// list number of members for each status
		for (Map.Entry<ExecutionState, Integer> stateCount : stateCounts.entrySet()) {
			json.append(",\""+stateCount.getKey()+"\": " + stateCount.getValue());
		}
		
		json.append("}");
		
		return json.toString();
	}
399954
@JsonInclude(Include.NON_EMPTY)
	@JsonProperty("id")
	public String getJsonId() {
		if (!EntityIdValue.SITE_LOCAL.equals(this.siteIri)) {
			return this.entityId;
		} else {
			return null;
		}
	}
1077904
protected Map<String, Object> toObjectJSON() {
		final Map<String, Object> objectJSON = new LinkedHashMap<String, Object>();
		// TODO: select correct object type - usage of own types allowed?
		objectJSON.put("objectType", "article");
		objectJSON.put("type", this.type);
		objectJSON.put("id", this.id);

		return objectJSON;
	}
1359971
public final String toJson() {
    Gson gson = new GsonBuilder()
      .registerTypeAdapter(BoundingBox.class, new BoundingBoxTypeAdapter())
      .create();
    return gson.toJson(this, BoundingBox.class);
  }
305338
Table DOMAINS() {

        Table t = sysTables[DOMAINS];

        if (t == null) {
            t = createBlankTable(sysTableHsqlNames[DOMAINS]);

            addColumn(t, "DOMAIN_CATALOG", SQL_IDENTIFIER);
            addColumn(t, "DOMAIN_SCHEMA", SQL_IDENTIFIER);
            addColumn(t, "DOMAIN_NAME", SQL_IDENTIFIER);
            addColumn(t, "DATA_TYPE", SQL_IDENTIFIER);
            addColumn(t, "CHARACTER_MAXIMUM_LENGTH", CARDINAL_NUMBER);
            addColumn(t, "CHARACTER_OCTET_LENGTH", CARDINAL_NUMBER);
            addColumn(t, "CHARACTER_SET_CATALOG", SQL_IDENTIFIER);
            addColumn(t, "CHARACTER_SET_SCHEMA", SQL_IDENTIFIER);
            addColumn(t, "CHARACTER_SET_NAME", SQL_IDENTIFIER);
            addColumn(t, "COLLATION_CATALOG", SQL_IDENTIFIER);
            addColumn(t, "COLLATION_SCHEMA", SQL_IDENTIFIER);
            addColumn(t, "COLLATION_NAME", SQL_IDENTIFIER);
            addColumn(t, "NUMERIC_PRECISION", CARDINAL_NUMBER);
            addColumn(t, "NUMERIC_PRECISION_RADIX", CARDINAL_NUMBER);
            addColumn(t, "NUMERIC_SCALE", CARDINAL_NUMBER);
            addColumn(t, "DATETIME_PRECISION", CARDINAL_NUMBER);
            addColumn(t, "INTERVAL_TYPE", CHARACTER_DATA);
            addColumn(t, "INTERVAL_PRECISION", CARDINAL_NUMBER);
            addColumn(t, "DOMAIN_DEFAULT", CHARACTER_DATA);
            addColumn(t, "MAXIMUM_CARDINALITY", SQL_IDENTIFIER);
            addColumn(t, "DTD_IDENTIFIER", SQL_IDENTIFIER);
            addColumn(t, "DECLARED_DATA_TYPE", CHARACTER_DATA);
            addColumn(t, "DECLARED_NUMERIC_PRECISION", CARDINAL_NUMBER);
            addColumn(t, "DECLARED_NUMERIC_SCLAE", CARDINAL_NUMBER);

            HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
                sysTableHsqlNames[DOMAINS].name, false, SchemaObject.INDEX);

            t.createPrimaryKey(name, new int[] {
                0, 1, 2, 4, 5, 6
            }, false);

            return t;
        }

        final int domain_catalog             = 0;
        final int domain_schema              = 1;
        final int domain_name                = 2;
        final int data_type                  = 3;
        final int character_maximum_length   = 4;
        final int character_octet_length     = 5;
        final int character_set_catalog      = 6;
        final int character_set_schema       = 7;
        final int character_set_name         = 8;
        final int collation_catalog          = 9;
        final int collation_schema           = 10;
        final int collation_name             = 11;
        final int numeric_precision          = 12;
        final int numeric_precision_radix    = 13;
        final int numeric_scale              = 14;
        final int datetime_precision         = 15;
        final int interval_type              = 16;
        final int interval_precision         = 17;
        final int domain_default             = 18;
        final int maximum_cardinality        = 19;
        final int dtd_identifier             = 20;
        final int declared_data_type         = 21;
        final int declared_numeric_precision = 22;
        final int declared_numeric_scale     = 23;

        //
        PersistentStore store = database.persistentStoreCollection.getStore(t);

        //
        Iterator it =
            database.schemaManager.databaseObjectIterator(SchemaObject.DOMAIN);

        while (it.hasNext()) {
            Type domain = (Type) it.next();

            if (!domain.isDomainType()) {
                continue;
            }

            if (!session.getGrantee().isAccessible(domain)) {
                continue;
            }

            Object[] data = t.getEmptyRowData();

            data[domain_catalog] = database.getCatalogName().name;
            data[domain_schema]  = domain.getSchemaName().name;
            data[domain_name]    = domain.getName().name;
            data[data_type]      = domain.getFullNameString();

            if (domain.isCharacterType()) {
                data[character_maximum_length] =
                    ValuePool.getLong(domain.precision);
                data[character_octet_length] =
                    ValuePool.getLong(domain.precision * 2);
                data[character_set_catalog] = database.getCatalogName().name;
                data[character_set_schema] =
                    ((CharacterType) domain).getCharacterSet().getSchemaName()
                        .name;
                data[character_set_name] =
                    ((CharacterType) domain).getCharacterSet().getName().name;
                data[collation_catalog] = database.getCatalogName().name;
                data[collation_schema] =
                    ((CharacterType) domain).getCollation().getSchemaName()
                        .name;
                data[collation_name] =
                    ((CharacterType) domain).getCollation().getName().name;
            } else if (domain.isNumberType()) {
                data[numeric_precision] =
                    ValuePool.getLong(((NumberType) domain).getPrecision());
                data[declared_numeric_precision] = data[numeric_precision];

                if (domain.typeCode != Types.SQL_DOUBLE) {
                    data[numeric_scale] = ValuePool.getLong(domain.scale);
                    data[declared_numeric_scale] = data[numeric_scale];
                }

                data[numeric_precision_radix] = ValuePool.getLong(
                    ((NumberType) domain).getPrecisionRadix());
            } else if (domain.isBooleanType()) {}
            else if (domain.isDateTimeType()) {
                data[datetime_precision] = ValuePool.getLong(domain.scale);
            } else if (domain.isIntervalType()) {
                data[interval_precision] = ValuePool.getLong(domain.precision);
                data[interval_type]      = domain.getFullNameString();
                data[datetime_precision] = ValuePool.getLong(domain.scale);
            } else if (domain.isBinaryType()) {
                data[character_maximum_length] =
                    ValuePool.getLong(domain.precision);
                data[character_octet_length] =
                    ValuePool.getLong(domain.precision);
            } else if (domain.isBitType()) {
                data[character_maximum_length] =
                    ValuePool.getLong(domain.precision);
                data[character_octet_length] =
                    ValuePool.getLong(domain.precision);
            }

            Expression defaultExpression =
                domain.userTypeModifier.getDefaultClause();

            if (defaultExpression != null) {
                data[domain_default] = defaultExpression.getSQL();
            }

            t.insertSys(store, data);
        }

        return t;
    }
1033219
public JSONObject toJSON() {
        JSONObject ret = super.toJSON();
        if (arguments != null && arguments.size() > 0) {
            ret.put("arguments", arguments);
        }
        ret.put("operation", operation);
        return ret;
    }
959985
private List<Domain> listAll(boolean reverse) throws GloboDnsException {
		GloboDnsRoot<Domain> globoDnsRoot = this.get("/domains.json" + (reverse ? "?reverse=true" : ""), true);
		if (globoDnsRoot == null) {
			throw new GloboDnsException("Invalid response");
		}
		return globoDnsRoot.getObjectList();
	}
1077730
public java.util.List<DomainMembership> getDomainMemberships() {
        if (domainMemberships == null) {
            domainMemberships = new com.amazonaws.internal.SdkInternalList<DomainMembership>();
        }
        return domainMemberships;
    }
833852
@Override
    Object asJSON() {
        final List<Object> json = new ArrayList<>();
        if (fromAlias != null) { json.add("." + fromAlias + "." + keyPath); }
        else { json.add("." + keyPath); }
        return json;
    }
724125
public Map<String, Object> toJson() {
    Map<String, Object> json = new HashMap<>();
    json.put("browserTimeout", browserTimeout);
    json.put("debug", debug);
    json.put("jettyMaxThreads", jettyMaxThreads);
    json.put("log", log);
    json.put("host", host);
    json.put("port", port);
    json.put("role", role);
    json.put("timeout", timeout);

    serializeFields(json);

    return json.entrySet().stream()
        .filter(entry -> entry.getValue() != null)
        .collect(toImmutableSortedMap(natural(), Map.Entry::getKey, Map.Entry::getValue));
  }
995825
public MBeanData[] getData()
   {
      MBeanData[] data = new MBeanData[domainData.size()];
      domainData.toArray(data);
      return data;
   }
1174746
public static List<String> availableDomains(IDBAccess dbAccess) {
		List<GrNode> resultList = loadAllDomainInfoNodes(dbAccess);
		List<String> domains = new ArrayList<String>();
		for (GrNode rNode : resultList) {
			domains.add(rNode.getProperty(DomainInfoNameProperty).getValue().toString());
		}
		return domains;
	}
1116024
def get_domains(self):
        
        url = self.API_TEMPLATE + self.DOMAINS
        data = self._get_json_from_response(url)

        domains = list()
        for item in data:
            domain = item['domain']
            domains.append(domain)
            self.logger.debug('Discovered domains: {}'.format(domain))

        return domains
565723
public JSONValue toJson() {

        JSONObject result = new JSONObject();
        if (null != getStart()) {
            result.put(JsonKey.START, dateToJson(getStart()));
        }
        if (null != getEnd()) {
            result.put(JsonKey.END, dateToJson(getEnd()));
        }
        if (isWholeDay()) {
            result.put(JsonKey.WHOLE_DAY, JSONBoolean.getInstance(true));
        }
        JSONObject pattern = patternToJson();
        result.put(JsonKey.PATTERN, pattern);
        SortedSet<Date> exceptions = getExceptions();
        if (exceptions.size() > 0) {
            result.put(JsonKey.EXCEPTIONS, datesToJsonArray(exceptions));
        }
        switch (getEndType()) {
            case DATE:
                result.put(JsonKey.SERIES_ENDDATE, dateToJson(getSeriesEndDate()));
                break;
            case TIMES:
                result.put(JsonKey.SERIES_OCCURRENCES, new JSONString(String.valueOf(getOccurrences())));
                break;
            case SINGLE:
            default:
                break;
        }
        if (!isCurrentTillEnd()) {
            result.put(JsonKey.CURRENT_TILL_END, JSONBoolean.getInstance(false));
        }
        if (getParentSeriesId() != null) {
            result.put(JsonKey.PARENT_SERIES, new JSONString(getParentSeriesId().getStringValue()));
        }
        return result;
    }