Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "json2rdf"
version = "0.1.1"
version = "0.2.0"
authors = ["bharath181 <bharathselvaraj18@gmail.com>", "Greg Hanson <g.isaac.hanson@gmail.com>"]
edition = "2021"
license = "BSD-3-Clause OR Apache-2.0"
Expand All @@ -14,6 +14,7 @@ categories = ["command-line-utilities", "encoding", "parser-implementations", "s
clap = { version = "4.6", features = ["derive"] }
oxrdf = "0.3"
serde_json = "1.0"
thiserror = "2"

[dev-dependencies]
oxrdfio = "0.2"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# at your option.

lint:
cargo install cargo-machete
@command -v cargo-machete >/dev/null 2>&1 || cargo install cargo-machete
cargo fmt --check
cargo machete
cargo clippy --benches --tests --bins --no-deps --all-features
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ The conversion functionality can also be called directly in Rust. The library su
use json2rdf::json_to_rdf;

// capture conversion results to file
let results = json_to_rdf(&"tests/airplane.json".to_string(), &Some("http://example.com/ns#".to_string()), &Some("output.nt".to_string()));
let results = json_to_rdf(&["tests/airplane.json"], Some("http://example.com/ns#"), Some("output.nt"));

// capture conversion results to an oxrdf::Graph
let results = json_to_rdf(&"tests/airplane.json".to_string(), &Some("http://example.com/ns#".to_string()), &None);
let results = json_to_rdf(&["tests/airplane.json"], Some("http://example.com/ns#"), None);

// multiple input files are merged into a single graph
let results = json_to_rdf(&["a.json", "b.json"], Some("http://example.com/ns#"), None);
```

## License
Expand Down
Loading
Loading