1
0
Fork
You've already forked zasa
0
No description
  • Rust 96.3%
  • Python 3.7%
2025年12月05日 17:43:12 +01:00
zasa version bump 2025年12月05日 17:43:12 +01:00
zasa-core removed dev-dependency on zasa-core from derive (idk if needed but for now, gonna research later 2025年12月01日 23:46:03 +01:00
zasa-derive derive now supports any type that implement Normalize trait 2025年12月05日 17:42:12 +01:00
.gitignore fjiaf 2025年02月25日 20:36:39 +01:00
Cargo.lock version bump 2025年12月05日 17:43:12 +01:00
Cargo.toml removed dev-dependency on zasa-core from derive (idk if needed but for now, gonna research later 2025年12月01日 23:46:03 +01:00
LICENSE.txt Prepare workspace for proc-macro 2024年11月18日 13:52:19 +01:00
README.md some docs 2024年12月07日 15:15:08 +01:00

Żasą

License: OQL

It's just own json parser writen only in rust, with 0 external dependencies, as part of my "No dependncies" series of projects.

Usage

Easiest way to use this library is to use it with Normalize macro, however it's still pretty unstable, but it works for basic stuff. Currently it supports String, f64 and bool types

use zasa::parser::Parser;
use zasa::value::normalize;
use zasa::Normalize;
#[derive(Debug, Normalize)]
struct Example {
 name: String,
 size: f64,
 active: bool
}
fn main() {
 let json_string = "{\"name\": \"test\", \"size\": 45.0, \"active\": true}";
 let parsed = Parser::new(json_string.chars()).parse().unwrap();
 let normalized: Example = normalize(parsed).unwrap();
 dbg!(normalized);
}

it will result in

normalized = Example {
 name: "test",
 size: 45.0,
 active: true,
}