📝 clarify async state export docs

This commit is contained in:
Nanaloveyuki
2026-06-14 01:50:30 +08:00
parent abed0f00b8
commit f824cbfa68
3 changed files with 7 additions and 0 deletions
+3
View File
@@ -40,6 +40,7 @@ Detailed rules explaining key parameters and behaviors
- `pretty=false` returns compact JSON.
- `pretty=true` returns indented JSON suitable for human diagnostics.
- This helper is built on top of `async_logger_state_to_json(...)`.
- Internally it stringifies the same JSON snapshot shape returned by the public export helper, using `@json_parser.stringify(...)` or `@json_parser.stringify_pretty(value, 2)`.
- The compact form matches snapshots such as `{"runtime":{"mode":"native_worker","background_worker":true},"pending_count":0,...}`.
- String output is convenient for logs, CLI output, and startup diagnostics.
@@ -78,3 +79,5 @@ e.g.:
2. The compact output shape is already locked by the async runtime snapshot tests, so it is suitable for stable diagnostics and assertions.
3. Use `async_logger_state_to_json(...)` when the next consumer still needs a `JsonValue` for composition before final stringification.