You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 6, 2020. It is now read-only.
The first test will pass; the second will fail to parse. The only difference between the two is <ProjectConfiguration> in the first, and <ProjectConfiguration Include=\"Debug|Win32\"> in the latter. Note that in this example, I'm ignoring ProjectConfiguration elements anyway and only trying to parse ClCompile.
The error produced is:
thread 'tests::read_with_project_configurations_attribute' panicked at 'called Result::unwrap() on an Err value: SyntaxError(expected tags or text, 1, 238)', C:\bot\slave\nightly-dist-rustc-win-msvc-64\build\src\libcore\result.rs:868
I added a panic!() to this crate to try to determine the cause; here is the backtrace to the error:
@marcusball You likely need #[serde(default)]on your collections so that, when tag are not found, it can generate an empty collection instead. At least with that attribute your example parses well with https://github.com/RReverser/serde-xml-rs, and I guess serde-xml uses similar technique.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Deserialization appears to fail for ignored tags that contain attributes.
Here's a full example:
The first test will pass; the second will fail to parse. The only difference between the two is
<ProjectConfiguration>
in the first, and<ProjectConfiguration Include=\"Debug|Win32\">
in the latter. Note that in this example, I'm ignoringProjectConfiguration
elements anyway and only trying to parseClCompile
.The error produced is:
I added a
panic!()
to this crate to try to determine the cause; here is the backtrace to the error:The text was updated successfully, but these errors were encountered: