From 8e409bbdf91daf338b583f29a4ea80a4282d5943 Mon Sep 17 00:00:00 2001 From: Nanaloveyuki Date: Sun, 14 Jun 2026 01:42:16 +0800 Subject: [PATCH] :memo: refine config stringify docs --- docs/api/stringify-logger-config.md | 7 +++++++ docs/api/stringify-queue-config.md | 7 +++++++ docs/api/stringify-sink-config.md | 7 +++++++ 3 files changed, 21 insertions(+) diff --git a/docs/api/stringify-logger-config.md b/docs/api/stringify-logger-config.md index 5dcc054..4b6416d 100644 --- a/docs/api/stringify-logger-config.md +++ b/docs/api/stringify-logger-config.md @@ -37,6 +37,7 @@ Detailed rules explaining key parameters and behaviors - `pretty=false` produces compact JSON. - `pretty=true` produces indented human-readable JSON. - This helper builds on top of `logger_config_to_json(...)`. +- Internally it serializes the `JsonValue` result with `@json_parser.stringify(...)` or `@json_parser.stringify_pretty(value, 2)`, so the text form stays aligned with the structured logger-config export helper. - Output is stable and suited for roundtrip config workflows. ### How to Use @@ -68,3 +69,9 @@ e.g.: - If config contains optional `queue=None`, the output omits that section rather than failing. +### Notes + +1. Use this helper when the next consumer expects JSON text instead of `JsonValue`. + +2. Use `logger_config_to_json(...)` when you still need to embed the config inside a larger JSON object before final stringification. + diff --git a/docs/api/stringify-queue-config.md b/docs/api/stringify-queue-config.md index 2aff20c..3892fb7 100644 --- a/docs/api/stringify-queue-config.md +++ b/docs/api/stringify-queue-config.md @@ -37,6 +37,7 @@ Detailed rules explaining key parameters and behaviors - `pretty=false` returns compact JSON suitable for logs and snapshots. - `pretty=true` returns indented JSON for human inspection. - This helper is built on top of `queue_config_to_json(...)`. +- Internally it serializes the `JsonValue` result with `@json_parser.stringify(...)` or `@json_parser.stringify_pretty(value, 2)`, so the text form stays aligned with the structured export helper. - The resulting text follows the same queue schema accepted by config parsing flows. ### How to Use @@ -70,3 +71,9 @@ e.g.: - If queue policy is too aggressive for workload burst size, serialization still succeeds because this helper only exports config. +### Notes + +1. Use this helper when the next consumer expects JSON text instead of `JsonValue`. + +2. Use `queue_config_to_json(...)` when you still need to embed the queue config inside a larger JSON object before final stringification. + diff --git a/docs/api/stringify-sink-config.md b/docs/api/stringify-sink-config.md index 06e6500..6662136 100644 --- a/docs/api/stringify-sink-config.md +++ b/docs/api/stringify-sink-config.md @@ -37,6 +37,7 @@ Detailed rules explaining key parameters and behaviors - `pretty=false` gives compact JSON. - `pretty=true` gives indented output. - This helper builds on top of `sink_config_to_json(...)`. +- Internally it serializes the `JsonValue` result with `@json_parser.stringify(...)` or `@json_parser.stringify_pretty(value, 2)`, so the text form stays aligned with the structured sink export helper. - It is useful when examples or generated docs want to show only sink-specific config. ### How to Use @@ -68,3 +69,9 @@ e.g.: - If optional `rotation` is absent, the serialized sink config simply omits that field. +### Notes + +1. Use this helper when the next consumer expects JSON text instead of `JsonValue`. + +2. Use `sink_config_to_json(...)` when you still need to embed the sink config inside a larger JSON object before final stringification. +