limingyi
890fdb5629
fix: fix nesting struct parsing bug
...
issue #192
Signed-off-by: limingyi <lessu@163.com>
2024-09-16 18:40:59 +02:00
Marc-Antoine Arnaud
a067b85ee2
feat: handle same field name but different namespace
...
issue #186
2024-08-31 16:54:53 +02:00
huangjf
58d81c7a87
feat: support generic
2024-06-05 08:07:07 +02:00
marcelbuesing
ce055249ce
Add struct name to required field error
2024-02-06 20:19:04 +01:00
Marc-Antoine Arnaud
82df2e15b9
feat!: remove requirement to Default
...
issue #175 #144
2024-02-06 00:36:58 +01:00
Marc-Antoine Arnaud
9c2d04b0af
fix: support attribute and field with same name
2024-02-03 08:13:39 +01:00
Marc-Antoine Arnaud
04396aafb2
refactor: fix fmt and clippy
2024-01-03 17:38:52 +01:00
John Hughes
9c5b993c84
Support deserializing xst xs:list attributes as Vec types.
2023-12-23 21:47:40 +01:00
Marc-Antoine Arnaud
a9b7aa2546
refactor: improve code based on clippy
2023-12-19 22:17:30 +01:00
Marc-Antoine ARNAUD
71432d1e9b
Merge pull request #134 from ephraimkunz/clippy-warnings-and-build
...
Fix clippy warnings and build with heck 0.4
2022-03-25 10:04:53 +01:00
Ephraim Kunz
c4d4828c56
Fix unwrap being hit in macro when malicious input is given
2022-01-14 12:50:05 -08:00
Ephraim Kunz
7148ec67c5
Fix clippy warnings and build with heck 0.4
2022-01-07 08:39:25 -08:00
Tom Dohrmann
5141abaf85
don't match nested end tags with the same name
2021-12-06 17:21:26 +01:00
Tom Dohrmann
d469128a48
don't corrupt the unused buffer when reading child
2021-12-06 17:19:39 +01:00
David Stangl
ae0a310d1f
Hide re-exported xml and log crates from docs
2021-07-24 12:10:41 +02:00
David Stangl
f845c0dfd1
Use custom target for derive-generated log calls
2021-07-24 12:06:31 +02:00
Oscar Beaumont
979ea4c23d
removed need for xml-rs and log in projects using yaserde
2021-06-29 02:45:30 +08:00
Marc-Antoine Arnaud
1fb21c2bf6
minor updates regarding clippy analysis
2021-05-31 08:27:43 +02:00
Marc-Antoine ARNAUD
a8ef1358a9
Merge pull request #112 from ephraimkunz/same-child-name
...
Fix bug where nested structs with the same element names don't deserialize properly.
2021-05-30 19:28:58 +02:00
Ephraim Kunz
72d61e03f4
Fix bug where nested structs with the same element names didn't deserialzie properly.
2021-05-05 07:34:38 -07:00
Ephraim Kunz
4b27b04ba4
Allow adding the 'text' attribute to Option<String>
2021-04-29 20:40:34 -07:00
Ephraim Kunz
269975d953
Use fully qualified method names to prevent collisions with serde derive macros
2021-02-05 19:26:54 -08:00
Jonas Platte
a1fc2f9fad
Revert parts of "Use absolute paths in generated code"
...
to restore compatibility with older versions of Rust.
2020-12-17 18:32:06 +01:00
Jonas Platte
c455f12d23
Drop unnecessary qualification of String outside of generated code
2020-12-17 17:50:16 +01:00
Jonas Platte
d3ee4112e3
Clean up visitor code generation
2020-12-17 17:50:16 +01:00
Jonas Platte
12ddcdbc87
Use absolute paths in generated code
...
With this, the derives should work with most of the crates and types
the generated code refers to being aliased.
Notably, methods are still mostly invoked using regular method syntax
so those coming from trait could still be aliased by outside code.
2020-12-17 17:50:16 +01:00
Jonas Platte
52fb60ec8b
Remove most extern crate statements from yaserde_derive
...
yaserde_derive is an edition 2018 crate, so these are not necessary.
2020-12-17 17:48:26 +01:00
Marc-Antoine Arnaud
fc5625a5e4
parse bool as defined in xs:boolean
2020-08-26 23:32:24 +02:00
marcelbuesing
701b92a2a4
Enforce std String in macros to avoid collisions
2020-08-03 20:28:53 +02:00
Scott Lamb
8a1e1e2e16
minor cleanup of element skipping
...
* "skipped" is unnecessary: it's always false at depth == 0,
so its one use in "if depth == 0 && !skipped" can be removed.
* the element doesn't need a binding, and shadowing "named_element"
confused me.
* remove old commented-out path that errored on unknown elements
2020-06-20 06:27:19 -07:00
Scott Lamb
c889461eef
improve logging in deserialize path and tests
...
* Log the depth of elements as they're fetched
* Log the starting depth of structs/enums and their Rust symbol names
(not just XML element names, which may differ significantly)
* Log every element in the struct/enum match loop at trace level.
* Log file/line numbers at a few key points in the tests.
This is helpful in finding failures happen in some of the longer
tests.
This logging helps me understand the data flow as I play with changes
for #76 .
2020-06-20 06:27:19 -07:00
Marc-Antoine Arnaud
10f2be69be
format code
2020-05-20 17:38:31 +02:00
Marc-Antoine Arnaud
0d2058ddb4
use heck to force camel case format on Visitor ident
...
issue #77
2020-05-20 16:58:55 +02:00
Marc-Antoine Arnaud
e2a2779f71
format code
2020-04-22 19:05:13 +02:00
Marc-Antoine Arnaud
975baabd76
remove root attribute, use rename
2020-04-22 19:04:43 +02:00
Marc-Antoine Arnaud
0872461c41
continue to refactor code using common Field structure
2020-04-22 18:18:11 +02:00
Marc-Antoine Arnaud
04ddaa29dc
restructure code
2020-04-21 15:02:34 +02:00
Marc-Antoine Arnaud
856e271f7f
support root flatten deserialization
2020-04-19 10:57:40 +02:00
Marc-Antoine Arnaud
2c632fe0ee
Merge branch 'master' of github.com:media-io/yaserde into fix_default_namespace_prefix
2020-04-06 14:42:33 +02:00
Marc-Antoine Arnaud
a93d70831f
use rust 2018 syntax, remove unused headers
2020-04-06 14:04:12 +02:00
Dmitry Samoylov
39185ffd03
Fix issue #51
2020-04-06 18:55:59 +07:00
Dmitry Samoylov
d262bc998f
Refactor reader
2020-04-06 18:12:17 +07:00
Dgame
c05e822865
Added explicit use log::debug
2020-03-29 20:36:30 +02:00
Dmitry Samoylov
b3d9ea0744
Fix issue 12 for attributes
2020-03-24 17:39:33 +07:00
Dmitry Samoylov
4aadc78fc1
Fix (de)serialization for elements with nested namespaces
2020-02-18 15:56:09 +07:00
Marc-Antoine ARNAUD
c15e289fec
Merge pull request #40 from DmitrySamoylov/refactoring
...
Refactoring
2020-02-16 11:25:25 +01:00
Dmitry Samoylov
1f3de44a98
Add skipping of unrecognized elements ( fixes #12 )
2020-02-13 19:34:47 +07:00
Dmitry Samoylov
476fd3790e
Put struct and simple_type visitors close to each other
2020-02-12 19:38:02 +07:00
Dmitry Samoylov
3e08dee3f4
Simplify de visitor generation
2020-02-12 18:37:42 +07:00
Dmitry Samoylov
cad7f88c4e
Add support for Option<struct> in 'attribute' fields
2020-02-12 15:45:30 +07:00