In the plugin ecosystem of DeepSeek Harness (DSH), handling nested JSON data typically requires manually writing parsing logic. The dsh--flatten plugin provides a direct conversion solution, mapping nested structures to dot-separated flat keys, making subsequent data processing or context management easier.
Plugin Purpose¶
This is a JSON flattening tool maintained by uckkk and categorized as an online tool category. Its core purpose is to enable bidirectional conversion between nested JSON and dot-separated flat keys, with support for array indices.
Core Features¶
- Nested ↔ flat conversion: Converts deep objects into
key.subkeyformat. - Array index support: Correctly handles array elements during flattening.
Installation and Activation¶
Run the following command to install the plugin. After installation, the tool is registered in the current DSH session.
dsh plugin add dsh--flatten
Typical Usage¶
After installation, call the registered tool in the DSH session.
flatten_(data={a:{b:1,c:[2,3]}})
This command converts {a: {b: 1, c: [2, 3]}} into flattened key-value pairs.
Notes¶
This is a pure Node implementation plugin. Since it runs third-party code locally, it is recommended to review its source code before installing. Additionally, the plugin follows the MIT license.
References¶
- Plugin directory: https://www.skillhub.cn/plugins/uckkk/dsh–flatten
- Source repository: https://github.com/uckkk/dsh–flatten