package org.springblade.sink.rabbitmq;

import com.alibaba.fastjson.JSON;
import org.apache.flink.api.common.serialization.SerializationSchema;

/**
 * @author: lianghanqiang
 * @description: rabbitmq sink json 序列化
 * @since: 10/28/21 -- 5:12 PM
 */
public class ObjectJsonParser<T> implements SerializationSchema<T> {

	@Override
	public byte[] serialize(T t) {
		return JSON.toJSONString(t).getBytes();
	}
}
