Skip to content

Commit

Permalink
validate: replace serde_json with simd_json
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Sep 27, 2024
1 parent 3c91062 commit da4b567
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmd/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,12 @@ pub fn run(argv: &[&str]) -> CliResult<()> {

// parse and compile supplied JSON Schema
let (schema_json, schema_compiled): (Value, Validator) =
// safety: we know the schema is_some() because we checked above
match load_json(&args.arg_json_schema.unwrap()) {
Ok(s) => {
// parse JSON string
match serde_json::from_str(&s) {
let mut s_slice = s.as_bytes().to_vec();
match simd_json::serde::from_slice(&mut s_slice) {
Ok(json) => {
// compile JSON Schema
match Validator::options()
Expand Down

0 comments on commit da4b567

Please sign in to comment.