You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
The example at https://github.com/rustless/valico#json-schema has a few issues:
std::old_io::fs
which has been deprecated (std: Deprecate std::old_io::fs rust-lang/rust#22873)serialize::json
instead ofserde_json::json
.When I try to run something very similar to it I get the following errors:
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 usingserde_json::Value
and notrustless::Value
(which I can't find the definition for).I'm unable to get this working in anyway, so assistance/clarification very welcome.
The text was updated successfully, but these errors were encountered: