jsonto

Crates.iojsonto
lib.rsjsonto
version0.1.1
sourcesrc
created_at2023-04-06 06:15:17.040207
updated_at2023-04-06 06:31:54.686448
descriptionjson string to frequently used programming languages type, it's lightweight and fast
homepage
repositoryhttps://github.com/atopx/jsonto
max_upload_size
id831955
size97,903
atopx (atopx)

documentation

README

jsonto

json string to frequently used programming languages type, it's lightweight and fast

example

fn main() {
    let input_str = r#"{
        "code": "country",
        "type": "PROPERTY_INT",
        "value": "国家"
    }"#;

    let mut options = jsonto::Options::default();
    options.output_mode = jsonto::OutputMode::Rust;
    let result = jsonto::codegen("property", input_str, options).unwrap();
    println!("-----auto genaration-----\n{}", result);
}
Commit count: 3

cargo fmt