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

net.linksfield.cube.partnersdk.json.JsonSerializer Maven / Gradle / Ivy

package net.linksfield.cube.partnersdk.json;

import java.util.Map;

/**
 * @ClassName JsonSerializer
 * @Description Json 序列化接口
 * @Author James.hu
 * @Date 2023/3/14
 **/
public interface JsonSerializer {
    /**
     * 转换为Key字段排序的Json
     * @param value 转换对象
     * @return
     */
    String toLinkedJson(Object value);

    /**
     * 转换为标准json
     * @param value 转换对象
     * @return
     */
    String toJson(Object value);

    /**
     * 将对象转换为Map
     * @param source 转换对象
     * @return
     */
    Map convertMap(Object source);

    /**
     * 解析Json到对象
     * @param source json原文
     * @param clazz 目标对象
     * @return
     */
     T parse(byte[] source, Class clazz);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy