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
8
9
10
use serde_json::Value;
use crate::domain::json_cleaner::clean_json;

pub struct CleanJsonUsecase;

impl CleanJsonUsecase {
    pub fn execute(input: Value) -> Value {
        clean_json(input).unwrap_or(Value::Null)
    }
}