import { JsonParser } from "jackson-js";
export const transform = (creatorClass, data) => {
    const mapper = new JsonParser({
        mainCreator: () => [creatorClass],
    });
    return mapper.transform(data, {
        features: {
            deserialization: {
                FAIL_ON_UNKNOWN_PROPERTIES: false
            }
        }
    });
};
export const transformArray = (creatorClass, data) => {
    const mapper = new JsonParser({
        mainCreator: () => [Array, [creatorClass]],
    });
    return mapper.transform(data, {
        features: {
            deserialization: {
                FAIL_ON_UNKNOWN_PROPERTIES: false
            }
        }
    });
};
//# sourceMappingURL=transformer.js.map