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 classDeserializes aSearchResponseby iterating over the json elements. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.gson.GsonTo convert JSON to a search result.private final ReaderReader 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:
readin interfaceSearchResultReader- Returns:
- search result derived from the JSON
- Throws:
IOException- if an error occurs using the reader
-