/** * Returns all non hidden marked fields of this {@code AddressMetric}. * * @return a JSON object representation of this Source including only non hidden marked fields. */ @Override default JsonObject toJson() { return toJson(FieldType.notHidden()); }
/** * Returns all non hidden marked fields of this {@code AddressMetric}. * * @return a JSON object representation of this Source including only non hidden marked fields. */ @Override default JsonObject toJson() { return toJson(FieldType.notHidden()); }
/** * Convert an indexed address metric into a JSON field. * * @param key Key of the address metric; may be empty. * @param metric the address metric to convert. * @return a valid JSON field for the address metric. */ static JsonField toJsonField(final String key, final AddressMetric metric) { final String nonemptyKey = key.isEmpty() ? "<empty>" : key; return JsonFactory.newField(JsonKey.of(nonemptyKey), metric.toJson()); } }
/** * Convert an indexed address metric into a JSON field. * * @param key Key of the address metric; may be empty. * @param metric the address metric to convert. * @return a valid JSON field for the address metric. */ static JsonField toJsonField(final String key, final AddressMetric metric) { final String nonemptyKey = key.isEmpty() ? "<empty>" : key; return JsonFactory.newField(JsonKey.of(nonemptyKey), metric.toJson()); } }
@Override default JsonObject toJson(final JsonSchemaVersion schemaVersion, final JsonFieldSelector fieldSelector) { return toJson(schemaVersion, FieldType.notHidden()).get(fieldSelector); }
@Override default JsonObject toJson(final JsonSchemaVersion schemaVersion, final JsonFieldSelector fieldSelector) { return toJson(schemaVersion, FieldType.notHidden()).get(fieldSelector); }