Parson is a Rust CLI application for high-performance JSON parsing and visualization. This tool is designed to be efficient and easy to use, perfect for processing large JSON files or multiple files in batch.
- Fast JSON parsing and reading
- Data visualization with interactive charts
- Advanced JSON querying with support for nested keys
- Support for processing multiple JSON files in batch
- Interactive menu with arrow key navigation
- Automatic processing of JSON files from input to output folders
- Error handling with informative messages
- TUI (Text User Interface) for better user experience
To get started with Parson, clone the repository using the following command:
git clone https://github.com/ryan-taylor/parson.git
cd parson
Parson requires Rust and Cargo to be installed on your system. If you don't have Rust installed, you can install it by following the instructions at https://www.rust-lang.org/tools/install.
After installing Rust, you can install the required dependencies by running:
cargo build
This command will download and compile all necessary dependencies specified in the Cargo.toml
file.
To build the project, run the following command in the project root directory:
cargo build --release
This will create an optimized executable in the target/release
directory.
After building the project, you can run Parson using the following command:
./target/release/parson
This will launch the interactive menu, where you can select the desired operation using the arrow keys and Enter.
- Fast Reading: Quickly processes all JSON files from 'JSON go here' to 'JSON fresh here' folders.
- Data Extraction: Extract specific data from JSON files using key paths.
- Data Validation: Validate JSON files and get a summary of valid and invalid files.
- File Compression: Compress JSON files with selectable compression levels.
- Multi-File Processing: Process multiple files based on a specified pattern.
- Custom Data Types: Apply custom data types to specific JSON keys.
- Error Checking: Check for errors in JSON files and display detailed reports.
- Pretty Printing: Format JSON files with custom indentation.
- Multi-Language Support: Simulate support for multiple languages (placeholder functionality).
- Speed Optimization: Simulate different optimization levels for JSON processing.
Parson uses two specific folders for input and output:
JSON go here
: Place your input JSON files in this folder.JSON fresh here
: Processed JSON files will be output to this folder.
When running Parson outside of Replit, there are a few differences to note:
- You need to manually create the
JSON go here
andJSON fresh here
folders in the project root directory. - The application uses the
config.toml
file for configuration. Make sure this file is properly set up for your environment. - You may need to adjust file paths in the code if your directory structure differs from the default setup.
To contribute to Parson or modify it for your needs:
- Clone the repository
- Make your changes
- Run tests:
cargo test
- Build the project:
cargo build --release
src/
: Contains the Rust source code filesCargo.toml
: Rust package manifest fileconfig.toml
: Contains configuration for non-Replit deploymentsREADME.md
: This file, containing project information and usage instructions
Parson uses the following third-party library:
- simd-json: A high-performance JSON parser that leverages SIMD instructions.
This project is licensed under the MIT License. See the LICENSE file for details.
simd-json is licensed under the Apache License, Version 2.0. The full text of the license can be found at http://www.apache.org/licenses/LICENSE-2.0.
Contributions are welcome! Please feel free to submit a Pull Request.
We would like to thank the contributors and maintainers of the simd-json library for their excellent work in creating a high-performance JSON parsing solution.
- Create two folders in the project root directory:
JSON go here
: Place your input JSON files in this folder.JSON fresh here
: Processed JSON files will be output to this folder.
- Ensure the
config.toml
file is properly set up for your environment.
To run Parson using Docker while accessing files on your local machine:
-
Create two directories on your desktop:
desktop_JSIN
: for input JSON filesdesktop_JSON
: for output files
-
Run the Docker container with volume mounting:
docker run -it --rm \ -v /path/to/desktop_JSIN:/workspaces/rust/JSIN \ -v /path/to/desktop_JSON:/workspaces/rust/JSON \ parson
Replace
/path/to/desktop_JSIN
and/path/to/desktop_JSON
with the actual paths to the directories you created. -
Place your input JSON files in the
desktop_JSIN
folder on your desktop. -
Run Parson from within the Docker container. The processed files will appear in the
desktop_JSON
folder on your desktop.