serdeval

Crates.ioserdeval
lib.rsserdeval
version0.1.0
sourcesrc
created_at2021-07-29 13:53:28.850666
updated_at2021-07-29 13:53:28.850666
descriptionSerde dummy types for fast and memory efficient typed validation.
homepage
repositoryhttps://github.com/MarinPostma/serdeval
max_upload_size
id428805
size920,601
ad hoc (MarinPostma)

documentation

README

SerdeVal

A serde validator

Overview

SerdeVal allows you to validate data that can be deserialized using serde, whithout actually deserializing to anything. This is usefull when you only want to validate that some data can be deserialized to some type. SerdeVal doesn't allocate anything, so it is extremely efficient for validating large files from disk:

use std::io::File;

use serdeval::*;

// we want to check that the very_big.json is an arrray of javascript objects:
fn main() {
	let json = File::open("very_big.json").unwrap();
	let _: Seq<Map<Str, Any>> = serde_json::from_reader(json).unwarp();
}

License: MIT

Commit count: 6

cargo fmt