We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I try to define a struct with json_ld derive attributes like:
#[derive(linked_data::Serialize)] #[ld(prefix("ex" = "http://example.org/"))] #[ld(type = "http://example.org/Bar")] pub struct WellKnown { #[ld("ex:name")] version: String, #[ld("ex:email")] path: String, }
And I search to serialize an instance of it into a string.
By doing that
let document = serialize(&WellKnown::new()).unwrap(); let content = document.with(&()).pretty_print().to_string(); println!("{content}");
I retrieve something close like (I expect to retrieve a dict, not a list of a dict):
[ { "@type": [ "http://example.org/Bar" ], "http://example.org/name": [ { "@value": "1.0" } ], "http://example.org/email": [ { "@value": "/" } ] } ]
A this point I didn't know the way to serialize a dataset itself and not the list.
Can you provide an example of it ?
Best,
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I try to define a struct with json_ld derive attributes like:
And I search to serialize an instance of it into a string.
By doing that
I retrieve something close like (I expect to retrieve a dict, not a list of a dict):
A this point I didn't know the way to serialize a dataset itself and not the list.
Can you provide an example of it ?
Best,
The text was updated successfully, but these errors were encountered: