All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.firelcw.codec.Encoder Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package com.github.firelcw.codec;

import java.util.Map;

/**
 * @author liaochongwei
 * @date 2020/7/31 9:30
 */
public interface Encoder {
    /**
     * 将对象转化成成Map 用于编码@Query和@Headers注解的对象
     * @param object 待编码对象
     * @return map
     */
     Map encodeMap(Object object);

    /**
     * 将对象转化成string(如果参数类型本身为简单类型,则直接转化成string),用于编码 @Body注解的对象(默认是解析成json字符串)
     * @param object 待编码对象
     * @return string
     */
     String encodeString(Object object);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy