Find why this replacer never emits the intended tagged Date object.
JavaScript
const text = JSON.stringify(
{ placedAt: new Date('2026-09-04T10:30:00.000Z') },
(key, value) => {
if (value instanceof Date) {
return { type: 'Date', value: value.toISOString() };
}
return value;
},
);
console.log(text);