Class BasicParser<T>
java.lang.Object
com.amilesend.client.parse.parser.BasicParser<T>
- Type Parameters:
T
- the object type
- All Implemented Interfaces:
GsonParser<T>
Defines a basic
GsonParser
implementation for single object type.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparse
(@NonNull com.google.gson.Gson gson, @NonNull InputStream jsonStream) Deserializes a JSON-formatted input stream to the defined POJO type.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.amilesend.client.parse.parser.GsonParser
parse
-
Constructor Details
-
BasicParser
-
-
Method Details
-
parse
public T parse(@NonNull @NonNull com.google.gson.Gson gson, @NonNull @NonNull InputStream jsonStream) Description copied from interface:GsonParser
Deserializes a JSON-formatted input stream to the defined POJO type.- Specified by:
parse
in interfaceGsonParser<T>
- Parameters:
gson
- the Gson instance used to deserialize the stringjsonStream
- stream with expected JSON-formatted contents- Returns:
- the parsed POJO instance
-