From 0af3654b993258b7bd61c9e7461410f05db9be83 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Tue, 13 Oct 2026 12:56:45 +0900 Subject: [PATCH] docs(circular): clarify JSON escaping for custom markers --- readme.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index e9ab913..0a1119e 100644 --- a/readme.md +++ b/readme.md @@ -48,7 +48,9 @@ stringify(circular, ['a', 'b'], 2) number. If set to `'string'`, bigint values are serialized as JSON strings. Otherwise they are ignored. **Default:** `true`. * `circularValue` {string|null|undefined|ErrorConstructor} Defines the value for - circular references. Set to `undefined`, circular properties are not + circular references. String values are wrapped in double quotes without JSON + escaping. Escape JSON special characters in the value to keep the output valid + JSON. Set to `undefined`, circular properties are not serialized (array entries are replaced with `null`). Set to `Error`, to throw on circular references. **Default:** `'[Circular: N]'`, where `N` is the referenced ancestor's depth, starting at 0 for the root. Set to `'[Circular]'`