Package org.ldaptive.io
Class JsonReader
java.lang.Object
org.ldaptive.io.JsonReader
- All Implemented Interfaces:
SearchResultReader
Reads JSON from a
Reader
and returns a SearchResponse
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
Deserializes aSearchResponse
by iterating over the json elements. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.gson.Gson
To convert JSON to a search result.private final Reader
Reader to read from. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread()
Reads JSON data from the reader and returns a search result.
-
Field Details
-
jsonReader
Reader to read from. -
gson
private final com.google.gson.Gson gsonTo convert JSON to a search result.
-
-
Constructor Details
-
JsonReader
Creates a new json reader.- Parameters:
reader
- to read JSON from
-
-
Method Details
-
read
Reads JSON data from the reader and returns a search result.- Specified by:
read
in interfaceSearchResultReader
- Returns:
- search result derived from the JSON
- Throws:
IOException
- if an error occurs using the reader
-