import { ObjectMapper } from "jackson-js";
class CustomDateSerializer {
    constructor() {
        this.mapper = (key, value, context) => {
            if (value instanceof Date) {
                return value.toISOString();
            }
            return value;
        };
        this.type = () => Date;
        this.order = 1;
    }
}
export const serialize = (data) => {
    const mapper = new ObjectMapper({
        serializers: [new CustomDateSerializer()]
    });
    const res = mapper.stringify(data);
    return res;
};
//# sourceMappingURL=serializer.js.map