clean-json
is a Go utility designed to extract the largest valid JSON object from a stream of mixed content. It is particularly useful for parsing logs, data streams, or files where JSON data is embedded within other text.
- Robust JSON Extraction: Efficiently parses and extracts embedded JSON from mixed text inputs.
- Handles Large Inputs: Optimized to process large volumes of data without performance degradation.
- Flexible: Can handle various JSON formats including objects and arrays.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them:
go version go1.15.2 linux/amd64
A step-by-step series of examples that tell you how to get a development environment running:
Clone the repository:
git clone https://github.com/garyblankenship/clean-json.git
Navigate to the cloned directory:
cd clean-json
Build the project:
go build
Run the utility:
echo '{"example": "data"}' | ./clean-json
Explain how to run the automated tests for this system:
go test
Here's a quick example to show you how to use clean-json
:
echo 'Some random text {"json": true} and more text' | ./clean-json
Expected output:
{"json": true}
This project is licensed under the MIT License - see the LICENSE.md file for details.