mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-07-24 00:42:18 +00:00
♻️ migrate to core json
This commit is contained in:
@@ -37,7 +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.
|
||||
- Internally it serializes the `Json` result with `value.stringify(...)` or `value.stringify(indent=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
|
||||
@@ -71,7 +71,7 @@ e.g.:
|
||||
|
||||
### Notes
|
||||
|
||||
1. Use this helper when the next consumer expects JSON text instead of `JsonValue`.
|
||||
1. Use this helper when the next consumer expects JSON text instead of `Json`.
|
||||
|
||||
2. Use `sink_config_to_json(...)` when you still need to embed the sink config inside a larger JSON object before final stringification.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user