-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
The example at https://github.com/rustless/valico#json-schema has a few issues:
- Uses
std::old_io::fs
which has been deprecated (std: Deprecate std::old_io::fs rust-lang/rust#22873) - Uses
serialize::json
instead ofserde_json::json
.
When I try to run something very similar to it I get the following errors:
error[E0308]: mismatched types
--> main.rs:82:49
|
82 | let event_schema = scope.compile_and_return(event_schema_json.clone(), true).ok().unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `rustless::Value`, found enum `serde_json::Value`
|
= note: expected type `rustless::Value`
found type `serde_json::Value`
error[E0308]: mismatched types
--> main.rs:83:52
|
83 | println!("Is valid: {}", event_schema.validate(&event_schema_json).is_valid());
| ^^^^^^^^^^^^^^^^^^ expected enum `rustless::Value`, found enum `serde_json::Value`
|
= note: expected type `&rustless::Value`
found type `&serde_json::Value`
I've tried to figure out why this happens by looking at scope.compile_and_return
but as far as I can gather it's using serde_json::Value
and not rustless::Value
(which I can't find the definition for).
I'm unable to get this working in anyway, so assistance/clarification very welcome.
Metadata
Metadata
Assignees
Labels
No labels