yassun7010 / serde_valid

JSON Schema based validation tool using serde.
MIT License
45 stars 10 forks source link

Error type is difficuit #59

Closed ollyde closed 4 months ago

ollyde commented 5 months ago

I would like if this library follows the rust standard where errors are a type we can manage and handle.

For example

object_to_validate.validate().unwrap_err()

This just returns a default error type with no way to infer what happened.

yassun7010 commented 4 months ago

Since validate returns a Result, what you want is already possible.

I have modified the code in the readme sample to be simpler.