Returns the JSON representation of this object.

@return the JSON representation of this object.
509958
public String toJson() {
        try {
            return JsonSerializer.toString(this);
        } catch (Exception e) {
            String message = String.format("Unformateable JSON search: %s", e.getMessage());
            Log.error(e, message);
            throw new IllegalArgumentException(message, e);
        }
    }
1264606
Object asJSON() {
        final List<Object> json = new ArrayList<>();
        for (Join join : joins) { json.add(join.asJSON()); }
        return json;
    }
914392
@SuppressWarnings("all")
    public JSONObject toJSONObject() {
        try {
            return Reflection.toType(this, JSONObject.class);
        } catch (Throwable e) {
            throw new RuntimeException("The output cannot be converted to jsonObject!", e);
        }
    }
456150
public JsonNode toJson() {
		ObjectNode node = new ObjectMapper().createObjectNode();
		node.put("code", code);
		if (format != null) {
			node.put("format", format);
		}
		return node;
	}
551676
public JSONObject getRawDataAsJson() throws IOException
    {
        String input = getRawDataAsString();
        if ( input == null ) {
            return null;
        }
        
        return new JSONObject(input);
    }
212430
public JSONObject toJSON() {
        try {
            return new JSONObject(properties).putOpt("name", getName());
        } catch (JSONException e) {
            e.printStackTrace();
            Log.e(TAG, e, "toJSON()");
            throw new RuntimeAssertion("NodeEntry.toJSON() failed for '%s'", this);
        }
    }
1248057
public function toJson()
    {
        $json = array();
        $json['id'] = $this->id;
        $json['url'] = $this->url;
        $json['pattern'] = $this->pattern;
        $json['event'] = $this->event;
        $json['name'] = $this->name;
        $json['links'] = $this->links;

        return $json;
    }
968538
public JSONObject toJson() throws JSONException {

        JSONObject result = new JSONObject();
        if (m_detailId != null) {
            result.put(JSON_DETAIL, "" + m_detailId);
        }
        if (m_siteRoot != null) {
            result.put(JSON_SITEROOT, m_siteRoot);
        }
        if (m_structureId != null) {
            result.put(JSON_STRUCTUREID, "" + m_structureId);
        }
        if (m_projectId != null) {
            result.put(JSON_PROJECT, "" + m_projectId);
        }
        if (m_type != null) {
            result.put(JSON_TYPE, "" + m_type.getJsonId());
        }
        return result;
    }
1285157
private JsonNode toJson(){
    	ObjectNode result = new ObjectNode(Topology.OBJECT_MAPPER.getNodeFactory());
        ArrayNode propertyArrayNode = new ArrayNode(Topology.OBJECT_MAPPER.getNodeFactory());
        for (PropertyColumn property : this.properties) {
            ObjectNode objectNode = property.toNotifyJson();
            objectNode.put("schemaName", property.getParentLabel().getSchema().getName());
            objectNode.put("abstractLabelLabel", property.getParentLabel().getLabel());
            propertyArrayNode.add(objectNode);
        }
        result.put("name", getName());
        result.set("properties", propertyArrayNode);
        return result;
    }
229825
public JSONObject toJson() {
        JSONObject ret = new JSONObject();
        JSONArray columns = new JSONArray(Arrays.asList(new String[]{"time"}));
        for (String f : this.columns) {
            columns.put(f);
        }
        ret.put(KEY_COLUMNS, columns);

        JSONArray data = new JSONArray();
        ret.put(KEY_ROWS, data);
        for (Long ts : rows.keySet()) {
            JSONArray row = new JSONArray();
            row.put(ts);
            Map<String, Object> temp = rows.get(ts);
            for (String f : this.columns) {
                Object val = temp.get(f);
                row.put(val != null ? val : JSONObject.NULL);
            }
            data.put(row);
        }

        return ret;
    }
83266
public String toJSON() {
        JSONBuilder jb = new JSONBuilder(estimateMaximumBytes()).append('{');
        appendParams(jb).append(',');
        appendTables(jb);
        jb.append('}');

        return jb.toString();
    }
298431
private JSON getJSON() throws JSONMarshallException {
        if (json == null) {
            JSONSettings settings = new JSONSettings(Include.NON_NULL);
            json = JSONFactory.newInstance(settings);
        }
        return json;
    }
56117
Object asJSON() {
        final Map<String, Object> json = new HashMap<>();
        json.put("JOIN", type.getTag());
        json.putAll(dataSource.asJSON());
        return json;
    }
588066
public String toJson() {
      try {
         Resource stringResource = Resources.fromString();
         write(stringResource);
         return stringResource.readToString().trim();
      } catch (IOException e) {
         throw Throwables.propagate(e);
      }
   }
986853
public String toJSON() {

        StringBuffer result = new StringBuffer();
        result.append("{\n");
        for (Entry<String, List<String>> simpleEntry : m_simpleAttributes.entrySet()) {
            result.append("\"").append(simpleEntry.getKey()).append("\"").append(": [\n");
            boolean firstValue = true;
            for (String value : simpleEntry.getValue()) {
                if (firstValue) {
                    firstValue = false;
                } else {
                    result.append(",\n");
                }
                result.append("\"").append(value).append("\"");
            }
            result.append("],\n");
        }
        for (Entry<String, List<CmsEntity>> entityEntry : m_entityAttributes.entrySet()) {
            result.append("\"").append(entityEntry.getKey()).append("\"").append(": [\n");
            boolean firstValue = true;
            for (CmsEntity value : entityEntry.getValue()) {
                if (firstValue) {
                    firstValue = false;
                } else {
                    result.append(",\n");
                }
                result.append(value.toJSON());
            }
            result.append("],\n");
        }
        result.append("\"id\": \"").append(m_id).append("\"");
        result.append("}");
        return result.toString();
    }
289187
public String toJSON() {
		StringBuilder json = new StringBuilder();
		json.append("[");
		for (int t = 0; t < components.size(); t++) {
			if (t > 0)
				json.append(",");
			T component = components.get(t);
			json
				.append("{")
				.append("\"label\":\"").append(component.getDisplayName()).append("\"")
				.append(",\"id\":\"").append(component.getId()).append("\"")
				.append("}")
			;
		}
		json.append("]");
		return json.toString();
	}
865733
public String getBody() {
        JsonObject wrapper = new JsonObject();
        wrapper.add(type, obj);
        return gsonBuilder.create().toJson(wrapper);
    }