In the DSH development workflow, handling JSON data often leads to inconsistent key order or messy formatting. The following plugin addresses this pain point.
Plugin Positioning¶
This is a toolset focused on JSON data processing. It is maintained by uckkk and implemented with Node.js. Its core capabilities are recursively sorting JSON keys, formatting, and minifying. The plugin belongs to the network tools category and uses the MIT license.
Core Features¶
- Recursive object key sorting: Sorts keys in nested objects while preserving the hierarchical structure.
- JSON formatting/minification: Converts JSON into a readable format or a compact format.
Installation and Enablement¶
Use the official command to install:
dsh plugin add dsh--tools
After installation, the plugin is added to dsh.profile.bundles in the profile’s package.json.
Typical Usage¶
After installation, you can call the tool function directly in a session. For example, sort the keys of a JSON snippet to make diffing easier:
json_sort(data={b:1,a:2})
Use Cases and Notes¶
This plugin is suitable for scenarios that require frequent JSON formatting, version comparison, or log data cleanup.
Note that installation means running third-party code locally. Before use, please carefully review the source code and license to ensure it meets your security and compliance requirements.
Summary¶
This tool provides DSH with lightweight JSON processing capabilities.
- Plugin directory: https://www.skillhub.cn/plugins/uckkk/dsh–tools
- Source repository: https://github.com/uckkk/dsh–tools