json_cleaner 0.1.4

A CLI tool to clean JSON files by removing null and empty values.
1
2
3
4
5
6
7
use std::fs;
use serde_json::Value;

pub fn read_json_file(path: &str) -> Value {
    let input_data = fs::read_to_string(path).expect("Failed to read input file");
    serde_json::from_str(&input_data).expect("Invalid JSON")
}