类的使用
org.springframework.boot.test.json.JsonContent
使用JsonContent的程序包
-
org.springframework.boot.test.json中JsonContent的使用
修饰符和类型方法说明BasicJsonTester.from
(byte[] source) Create JSON content from the specified JSON bytes.Create JSON content from the specified JSON file.BasicJsonTester.from
(InputStream source) Create JSON content from the specified JSON input stream.BasicJsonTester.from
(CharSequence source) Create JSON content from the specified String source.Create JSON content from the specified resource path.Create JSON content from the specified JSON resource.protected JsonContent
<T> AbstractJsonMarshalTester.getJsonContent
(String json) Factory method used to get aJsonContent
instance from a source JSON string.protected JsonContent
<T> JacksonTester.getJsonContent
(String json) ReturnJsonContent
from writing the specific value.