- All Implemented Interfaces:
IMapper
Implementation of the IMapper interface for mapping between JSON representation and Java objects
using Moshi.
-
Constructor Summary
Constructors
-
Method Summary
<T> T
Converts the provided JSON value into an instance of the specified class.
Converts the provided object into its JSON representation.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ReSMSMapper
public ReSMSMapper()
-
Method Details
-
toJson
Converts the provided object into its JSON representation.
- Specified by:
toJson in interface IMapper
- Parameters:
object - The object to be converted to JSON.
- Returns:
- The JSON representation of the object.
-
fromJson
Converts the provided JSON value into an instance of the specified class.
- Specified by:
fromJson in interface IMapper
- Type Parameters:
T - The type of the resulting object.
- Parameters:
value - The JSON value to be converted.
clazz - The class to convert the JSON value to.
- Returns:
- An instance of the specified class with values from the JSON value.