Skip to content

Commit

Permalink
Fix deserializing wikidata property in Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
Binh Vu committed Mar 28, 2024
1 parent 610ce00 commit fd0eea8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
### Fixed

- Fix domain/ranges of dbpedia property dataset & make them not optional
- Fix deserializing wikidata property in Rust

## [7.0.0] (2024-03-24)

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kgdata"
version = "4.0.0"
version = "4.0.1"
edition = "2021"
readme = "README.md"
homepage = "https://github.com/binh-vu/kgdata"
Expand Down
6 changes: 6 additions & 0 deletions src/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ impl<'de> Deserialize<'de> for WDProperty {
))
})?;
}
"constraints" => {
let _constraints: Vec<WDStatement> = map.next_value().map_err(|e| {
Error::custom(format!("deser property's constraints: {}", e.to_string()))
})?;
}
_ => {
return Err(M::Error::unknown_field(
key,
Expand All @@ -323,6 +328,7 @@ impl<'de> Deserialize<'de> for WDProperty {
"inverse_properties",
"instanceof",
"ancestors",
"constraints"
],
));
}
Expand Down

0 comments on commit fd0eea8

Please sign in to comment.