Interface JsonObjectReader<T>
- Type Parameters:
T
- type of the target object
- All Known Implementing Classes:
GsonJsonObjectReader
,JacksonJsonObjectReader
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.
- Since:
- 4.1
- Author:
- Mahmoud Ben Hassine
-
Method Summary
-
Method Details
-
open
Open the Json resource for reading.- Parameters:
resource
- the input resource- Throws:
Exception
- if unable to open the resource
-
read
Read the next object in the Json resource if any.- Returns:
- the next object or
null
if the resource is exhausted - Throws:
Exception
- if unable to read the next object
-
close
Close the input resource.- Throws:
Exception
- if unable to close the input resource
-