File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/main/java/dev/resms/core/mapper Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ public interface IMapper {
99 * @param object The object to be converted to JSON.
1010 * @return The JSON representation of the object.
1111 */
12- String writeValue (Object object );
12+ String toJson (Object object );
1313
1414 /**
1515 * Converts the provided JSON value into an instance of the specified class.
@@ -19,5 +19,5 @@ public interface IMapper {
1919 * @param <T> The type of the resulting object.
2020 * @return An instance of the specified class with values from the JSON value.
2121 */
22- <T > T readValue (String value , Class <T > clazz );
22+ <T > T fromJson (String value , Class <T > clazz );
2323}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public ReSMSMapper() {
2222 * @return The JSON representation of the object.
2323 */
2424 @ Override
25- public String writeValue (Object object ) {
25+ public String toJson (Object object ) {
2626 return moshi .adapter (Object .class ).toJson (object );
2727 }
2828
@@ -35,7 +35,7 @@ public String writeValue(Object object) {
3535 * @return An instance of the specified class with values from the JSON value.
3636 */
3737 @ Override
38- public <T > T readValue (String value , Class <T > clazz ) {
38+ public <T > T fromJson (String value , Class <T > clazz ) {
3939 try {
4040 return moshi .adapter (clazz ).fromJson (value );
4141 } catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments