
package org.tio.sitexxx.service.init;

import com.alibaba.fastjson.serializer.ToStringSerializer;
import org.tio.sitexxx.service.json.IpInfoSerializeFilter;
import org.tio.sitexxx.service.json.UserSerializeFilter;
import org.tio.sitexxx.service.model.main.IpInfo;
import org.tio.sitexxx.service.model.main.User;
import org.tio.jfinal.JfinalRecordSerializer;
import org.tio.jfinal.plugin.activerecord.Record;
import org.tio.utils.json.Json;

import java.math.BigInteger;

/**
 * @author tanyaowu
 * 2016年8月18日 下午4:52:28
 */
public class JsonInit {
	public static void init() {
		Json.put(User.class, UserSerializeFilter.me);
		Json.put(IpInfo.class, IpInfoSerializeFilter.ME);
		Json.put(Record.class, JfinalRecordSerializer.me);

		Json.put(BigInteger.class, ToStringSerializer.instance);
		Json.put(Long.class, ToStringSerializer.instance);
		Json.put(Long.TYPE, ToStringSerializer.instance);
	}
}
