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

io.leopard.json.IJson Maven / Gradle / Ivy

Go to download

规范、简化Json操作,可选Jackson、FastJson实现。并可在TopNB查看耗时统计信息。

There is a newer version: 0.9.12
Show newest version
package io.leopard.json;

import java.util.List;
import java.util.Map;

public interface IJson {

	/**
	 * 将对象转成json.
	 * 
	 * @param obj 对象
	 * @return
	 */
	String toJson(Object obj);

	/**
	 * 将对象转成json.
	 * 
	 * @param obj 对象
	 * @return
	 */
	String toFormatJson(Object obj);

	/**
	 * 将Json转换成对象.
	 * 
	 * @param json
	 * @param valueTypes
	 * @return
	 */
	 T toObject(String json, Class clazz);

	 T toObject(String json, Class clazz, boolean ignoreUnknownField);

	 List toListObject(String json, Class clazz);

	 List toListObject(String json, Class clazz, boolean ignoreUnknownField);

	 List toListObject(List jsonList, Class clazz);

	 List toListObject(List jsonList, Class clazz, boolean ignoreUnknownField);

	Map toMap(String json);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy