use of org.springframework.boot.configurationprocessor.metadata.TestJsonConverter in project spring-boot by spring-projects.
the class ConfigurationMetadataAnnotationProcessorTests method writeAdditionalHints.
private void writeAdditionalHints(ItemHint... hints) throws Exception {
TestJsonConverter converter = new TestJsonConverter();
File additionalMetadataFile = createAdditionalMetadataFile();
JSONObject additionalMetadata = new JSONObject();
additionalMetadata.put("hints", converter.toJsonArray(Arrays.asList(hints)));
writeMetadata(additionalMetadataFile, additionalMetadata);
}
use of org.springframework.boot.configurationprocessor.metadata.TestJsonConverter in project spring-boot by spring-projects.
the class ConfigurationMetadataAnnotationProcessorTests method writeAdditionalMetadata.
private void writeAdditionalMetadata(ItemMetadata... metadata) throws Exception {
TestJsonConverter converter = new TestJsonConverter();
File additionalMetadataFile = createAdditionalMetadataFile();
JSONObject additionalMetadata = new JSONObject();
JSONArray properties = new JSONArray();
for (ItemMetadata itemMetadata : metadata) {
properties.put(converter.toJsonObject(itemMetadata));
}
additionalMetadata.put("properties", properties);
writeMetadata(additionalMetadataFile, additionalMetadata);
}
Aggregations