"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformArray = exports.transform = void 0;
const jackson_js_1 = require("jackson-js");
const transform = (creatorClass, data) => {
    const mapper = new jackson_js_1.JsonParser({
        mainCreator: () => [creatorClass],
    });
    return mapper.transform(data, {
        features: {
            deserialization: {
                FAIL_ON_UNKNOWN_PROPERTIES: false
            }
        }
    });
};
exports.transform = transform;
const transformArray = (creatorClass, data) => {
    const mapper = new jackson_js_1.JsonParser({
        mainCreator: () => [Array, [creatorClass]],
    });
    return mapper.transform(data, {
        features: {
            deserialization: {
                FAIL_ON_UNKNOWN_PROPERTIES: false
            }
        }
    });
};
exports.transformArray = transformArray;
//# sourceMappingURL=transformer.js.map