protected byte[] writeJsonValue(OpenAPI openAPI) throws JsonProcessingException {
		String result;
		ObjectMapper objectMapper = springDocProviders.jsonMapper();
		if (springDocConfigProperties.isWriterWithOrderByKeys())
			ObjectMapperProvider.sortOutput(objectMapper, springDocConfigProperties);
		if (!springDocConfigProperties.isWriterWithDefaultPrettyPrinter())
			result = objectMapper.writerFor(OpenAPI.class).writeValueAsString(openAPI);
		else
			result = objectMapper.writerWithDefaultPrettyPrinter().forType(OpenAPI.class).writeValueAsString(openAPI);
		return result.getBytes(StandardCharsets.UTF_8);
	}
Write json value string.

@param openAPI the open api
@return the string
@throws JsonProcessingException the json processing exception
springdoc-openapi-starter-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java