Benign rust 495 installs Download

jsonld-compaction 0.24.0

“JSON-LD document compaction implementation”

Basename is uppercase README.mdRust test marker or harness
SHA-2560a6e76fdb81806ffc894f541c8d530e5bf32fa9063e81c19cc0b714edf779fe5

Evidence

imports jsonld_context_processing::Process test_fixtures.rs · lines 1–18
1//! Processed contexts and expanded objects shared by the unit tests of the
2//! public single-value entry points.
3#![allow(clippy::unwrap_used)]
4
5use crate::{CompactFragment, Options, compact_iri_with, values_as_array};
6use jsonld_context_processing::Process;
7use jsonld_core::{Container, Context, Id, Indexed, NoLoader, Object, Term, TryFromJson};
8use jsonld_syntax::{Parse, TryFromJson as _};
9use rdfx::{
10 BlankIdBuf,
11 IriBuf,
12 vocabulary::{no_vocabulary, no_vocabulary_mut},
13};
14
⋯4 lines
URL uses RFC 2606 reserved documentation TLD test_fixtures.rs · lines 21–32
21:19… ning one term per IRI and no map containers, so that every
22/// value of a property compacts under a single key.
23pub(crate) const VALUE_CONTEXT: &str = r#"{
24 "@vocab": "https://vocab.example/",
25 "ex": "https://example.com/",
26 "xsd": "http://www.w3.org/2001/XMLSchema#",
27 "id": "@id",
28 "type": "@type",
29 "value": "@value",
30 "lang": "@language",
31 "Building": "https://example.com/Building",
32 "count": { "@id": …
imports crate::test_fixtures::as_written_under value.rs · lines 257–271
⋯4 lines
261}
262
263#[cfg(test)]
264mod tests {
265 #![allow(clippy::unwrap_used)]
266 use super::*;
267 use crate::test_fixtures::{VALUE_CONTEXT, as_written_under, compact_one_value_document, expanded_object, json, processed_context};
268 use rdfx::vocabulary::no_vocabulary;
269
270 /// Compacting one value object on its own gives what the full compaction
271 /// algorit …
References the Tokio async runtime namespace value.rs · lines 272–275
272:11… lue reduces to a scalar and when it stays a value object.
273 #[tokio::test]
274 async fn compact_value_matches_the_compaction_of_a_one_value_document() {
275 let context = processed_context(VALU …
imports crate::CompactFragment node.rs · lines 510–528
⋯4 lines
514}
515
516#[cfg(test)]
517mod tests {
518 #![allow(clippy::unwrap_used)]
519 use super::*;
520 use crate::{
521 CompactFragment,
522 test_fixtures::{VALUE_CONTEXT, compact_one_value_document, expanded_object, json, processed_context},
523 };
524 use jsonld_core::NoLoader;
525 use rdfx::vocabulary::{no_vocabulary, no_vocabulary_mut};
526
527 /// Compacting one node reference on its own gives what the full compaction
528 /// algorithm writes for i …

Showing the top 5 files — 2 more files (35 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.