Package dev.resms.core.mapper
Interface IMapper
- All Known Implementing Classes:
ReSMSMapper
public interface IMapper
An interface for mapping between JSON representation and Java objects using Moshi.
-
Method Summary
-
Method Details
-
toJson
Converts the provided object into its JSON representation.- 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.- 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.
-