import { safeJsonStringify } from "../../../../util/log-sanitizer.js";
export const safeSampleJson = (value) => {
    try {
        let sample = safeJsonStringify(value);
        if (sample.length > 500) {
            sample = sample.slice(0, 500) + "... (sample)";
        }
        return sample;
    }
    catch (error) {
        return typeof value === "string"
            ? value
            : `${typeof value} (not serializable - ${error})`;
    }
};
//# sourceMappingURL=sample-json.js.map