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
Good day
It seems that the following attrs are not working.
default_namespace, namespaces, prefix
as a example
#[derive(YaSerialize)] #[yaserde(default_namespace = "namespace")] struct S1 { field1: String, field2: String, #[yaserde(prefix = "prefix")] field3: String }
one would expect something like the following to render
<namespace:field1></namespace:field1> <namespace:field2></namespace:field2> <prefix:field3></prefix:field3>
this is not the case and the prefix and default_namespace dont do anything at all. resulting in the following
<field1></field1> <field2></field2> <field3></field3>
I am now forced to do the following
#[derive(YaSerialize)] struct S1 { #[yaserde(rename = "namespace:field1")] field1: String, #[yaserde(rename = "namespace:field1")] field2: String, #[yaserde(rename = "prefix:field1")] field3: String }
am i doing something wrong or is this a bug..?
kind regards
The text was updated successfully, but these errors were encountered:
Hi,
You use incorrectly YaSerDe, you miss the namespaces declaration. This attribute will defines the mapping between prefix and URL.
Here some example with you case:
#[derive(YaSerialize)] #[yaserde( rename = "Envelope", default_namespace = "namespace" namespaces = { "namespace" = "http://example.com/", "prefix" = "http://example.com/prefix", }, prefix = "soapenv" )] struct S1 { #[yaserde(prefix = "namespace")] field1: String, field2: String, #[yaserde(prefix = "prefix")] field3: String }
Sorry, something went wrong.
No branches or pull requests
Good day
It seems that the following attrs are not working.
as a example
one would expect something like the following to render
this is not the case and the prefix and default_namespace dont do anything at all. resulting in the following
I am now forced to do the following
am i doing something wrong or is this a bug..?
kind regards
The text was updated successfully, but these errors were encountered: