pub trait TryFromJsonObject<T, B>: Sized {
// Required method
fn try_from_json_object_in(
vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>,
object: Object,
) -> Result<Self, InvalidExpandedJson>;
}Expand description
Try to convert from a JSON object directly into an expanded JSON-LD object without going through the expansion algorithm.
The input JSON object must be in expanded JSON-LD form.
Required Methods§
Sourcefn try_from_json_object_in(
vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>,
object: Object,
) -> Result<Self, InvalidExpandedJson>
fn try_from_json_object_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, object: Object, ) -> Result<Self, InvalidExpandedJson>
Builds this fragment from a JSON object, interning terms in the given vocabulary.
§Errors
Returns an error when the JSON object does not describe a valid expanded object.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<T, B, O: TryFromJsonObject<T, B>> TryFromJsonObject<T, B> for Indexed<O>
Every nesting level of an expanded document is read through this
implementation (objects, nodes, lists, graphs, included and reverse
nodes alike), so it is the one recursion point of TryFromJson: each
level runs on sufficient native stack, and a document of any depth is read
on any thread.