接口 JsonObjectReader<T>
- 类型参数:
T
- type of the target object
public interface JsonObjectReader<T>
Strategy interface for Json readers. Implementations are expected to use a streaming API in order to read Json objects one at a time.- 从以下版本开始:
- 4.1
- 作者:
- Mahmoud Ben Hassine
方法详细资料
open
default void open(org.springframework.core.io.Resource resource) throws java.lang.Exception
Open the Json resource for reading.- 参数:
resource
- the input resource- 抛出:
java.lang.Exception
- if unable to open the resource
read
@Nullable T read() throws java.lang.Exception
Read the next object in the Json resource if any.- 返回:
- the next object or
null
if the resource is exhausted - 抛出:
java.lang.Exception
- if unable to read the next object
close
default void close() throws java.lang.Exception
Close the input resource.- 抛出:
java.lang.Exception
- if unable to close the input resource