"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.serialize = void 0;
const jackson_js_1 = require("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;
    }
}
const serialize = (data) => {
    const mapper = new jackson_js_1.ObjectMapper({
        serializers: [new CustomDateSerializer()]
    });
    const res = mapper.stringify(data);
    return res;
};
exports.serialize = serialize;
//# sourceMappingURL=serializer.js.map