接口的使用
org.springframework.boot.json.JsonWriter
使用JsonWriter的程序包
程序包
说明
Support for parsing JSON.
Support for structured logging.
-
org.springframework.boot.json中JsonWriter的使用
修饰符和类型方法说明static <T> JsonWriter<T> JsonWriter.of(Consumer<JsonWriter.Members<T>> members) Factory method to return aJsonWriterwith specificmember mapping.static <T> JsonWriter<T> JsonWriter.standard()Factory method to return aJsonWriterfor standard Java types.default JsonWriter<T> JsonWriter.withNewLineAtEnd()Return a newJsonWriterinstance that appends a new line after the JSON has been written.default JsonWriter<T> JsonWriter.withSuffix(String suffix) Return a newJsonWriterinstance that appends the given suffix after the JSON has been written. -
org.springframework.boot.logging.structured中JsonWriter的使用
限定符构造器说明protectedJsonWriterStructuredLogFormatter(JsonWriter<E> jsonWriter) Create a newJsonWriterStructuredLogFormatterinstance with the givenJsonWriter.