module
Version:
v0.0.0-...-b1ea630
Opens a new window with list of versions in this module.
Published: Aug 23, 2024
License: MIT
Opens a new window with license information.
README
¶
ccjsonparser
ccjsonparser
is a command-line tool for validating JSON data.
This is a Go study project based on the Coding Challenges exercises, particularly this one.
Features
- Validate JSON: Validate JSON from file or standard input.
Installation
You can build and install ccjsonparser
from source using Go. Make sure you have Go installed on your system.
-
Clone the repository:
git clone https://github.com/username/ccjsonparser.git
cd ccjsonparser
-
Build the executable:
make build
-
(Optional) Move the binary to a directory in your PATH for easy access:
mv ccjsonparser /usr/local/bin/
Usage
ccjsonparser [filepath]
Examples
-
Validate JSON from a file:
ccjsonparser example.json
-
Validate JSON from standard input:
echo '{"name":"John","age":30}' | ccjsonparser
Exit Codes
Code |
Description |
0 |
Valid JSON |
1 |
Invalid JSON |
2 |
Error reading from file/stdin |
Test files
Test files (in testdata/
folder) came from Coding Challenges and JSON.org.
Future Ideas
- Format JSON: Beautify and format JSON data for better readability.
- Extract Data: Retrieve specific fields or values from JSON objects.
- Filter Data: Apply filters to JSON data to extract relevant information.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Directories
¶
cmd
|
|
|
|
internal
|
|
|
|
|
|
|
|
|
|
|
|
Click to show internal directories.
Click to hide internal directories.