Get the data as JSON data in an array format (<code>[ [scale,nanos], ...]</code>
@return a JSON formatted string containing the raw data.
10843
public String toJSONString() {
        
        String rawdata = stats.stream().sorted(Comparator.comparingInt(UStats::getIndex))
                .map(sr -> sr.toJSONString())
                .collect(Collectors.joining(",\n    ", "[\n    ", "\n ]"));
        
        String fields = Stream.of(UStats.getJSONFields()).collect(Collectors.joining("\", \"", "[\"", "\"]"));
        
        String models = Stream.of(ScaleDetect.rank(this)).map(me -> me.toJSONString()).collect(Collectors.joining(",\n    ", "[\n    ", "\n  ]"));
        
        return String.format("{ title: \"%s\",\n  nano_tick: %d,\n  models: %s,\n  fields: %s,\n  data: %s\n}",
                title, UUtils.getNanoTick(), models, fields, rawdata);
    }
1332024
private String jsonifyData(Map<String, ? extends Object> data) {
        JSONObject jsonData = new JSONObject(data);

        return jsonData.toString();
    }
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);
        }
    }
489552
public function jsonSerialize()
    {
        $data = array();
        foreach (get_object_vars($this) as $k => $v) {
            if (!empty($v)) {
                $data[$k] = $v;
            }
        }
        return $data;
    }
76125
public Map<String, Object> getData() {
        TypeToken<Map<String, Object>> typeToken = new TypeToken<Map<String, Object>>() {};
        return getData(typeToken);
    }
614190
@SuppressWarnings("unused")
  public String toJson() {
    Gson gson = new GsonBuilder()
      .registerTypeAdapterFactory(GeocodingAdapterFactory.create())
      .create();
    return gson.toJson(this);
  }
868864
public JSONObject getJson() throws JSONException {
        JSONObject json = create();
        if (value != null)
            json.put("value", value);
        if (label != null)
            json.put("label", label);
        if (type != null)
            json.put("type", type);
        if (display != null)
            json.put("display", display.toString());
        if (sequence != 0)
            json.put("sequence", sequence);
        if (indexKey != null)
            json.put("indexKey", indexKey);
        return json;
    }
984970
public JSONObject toJson() {
        JSONObject obj = new JSONObject().put(OBJECT_LOCATION, new JSONObject().put("lat", lat).put("lng", lng))
                .put(STRING_NAME, name).put(STRING_TYPES, new JSONArray(types));
        if (accuracy != -1)
            obj.put(INTEGER_ACCURACY, accuracy);
        if (phoneNumber != null)
            obj.put(STRING_PHONE_NUMBER, phoneNumber);
        if (address != null)
            obj.put(STRING_ADDRESS, address);
        if (website != null)
            obj.put(STRING_WEBSITE, website);
        if (locale != null)
            obj.put(STRING_LANGUAGE, locale.getLanguage());
        return obj;
    }
1212430
public JSONArray getKeywordsJsonArray() {
        JSONArray keywordArray = new JSONArray();
        for (String keyword : keywords_) {
            keywordArray.put(keyword);
        }
        return keywordArray;
    }
1256721
public List<CollectionJsonData> getData() {

		if (!this.data.isEmpty()) {
			return this.data;
		}

		if (this.rawData != null && PRIMITIVE_TYPES.contains(this.rawData.getClass())) {
			return Collections.singletonList(new CollectionJsonData().withValue(this.rawData));
		}

		return PropertyUtils.findProperties(this.rawData).entrySet().stream() //
				.map(entry -> new CollectionJsonData() //
						.withName(entry.getKey()) //
						.withValue(entry.getValue())) //
				.collect(Collectors.toList());
	}
1114712
Object asJSON() {
        final List<Object> json = new ArrayList<>();
        json.add(limit.asJSON());
        if (offset != null) { json.add(offset.asJSON()); }
        return json;
    }
694544
public String toJsonString() {
    	JSONArray jsonArray = new JSONArray();        
        for (LabeledItem<T> labeledItem : data) {
            JSONArray itemArray = new JSONArray();
            itemArray.put(labeledItem.getLabel());
            itemArray.put(labeledItem.getValue());
            jsonArray.put(itemArray);
        }
        JSONArray outerArray = new JSONArray();
        outerArray.put(jsonArray);
        return outerArray.toString();
    }
1067443
public synchronized String makeJsonString() {
    
    Map<String, Map<String, Long>> data =
        new HashMap<String, Map<String, Long>>();
    
    for (Group group : this) {
      Map<String, Long> groupData = new HashMap<String, Long>();
      data.put(group.getDisplayName(), groupData);
      for (Counter counter : group) {
        groupData.put(counter.getDisplayName(), counter.getCounter());
      }
    }
    return JSON.toString(data);
  }
56117
Object asJSON() {
        final Map<String, Object> json = new HashMap<>();
        json.put("JOIN", type.getTag());
        json.putAll(dataSource.asJSON());
        return json;
    }
1033219
public JSONObject toJSON() {
        JSONObject ret = super.toJSON();
        if (arguments != null && arguments.size() > 0) {
            ret.put("arguments", arguments);
        }
        ret.put("operation", operation);
        return ret;
    }
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();
    }
986371
public String toJson() {
        StringWriter stringWriter = new StringWriter();
        JsonWriter jsonWriter = Json.createWriter(new PrintWriter(stringWriter));
        jsonWriter.writeObject(toJsonObject());
        jsonWriter.close();
        return stringWriter.toString();
    }