Commit Graph

175 Commits

Author SHA1 Message Date
lifichi
37b0ae263b
fix: break from the loop after matching enum variant 2022-08-14 23:04:02 +02:00
TheSchemm
2f8e87cd88 Basic support for enum attribute serialization 2022-05-04 20:36:59 -05:00
Marc-Antoine Arnaud
a0afd7c34f (cargo-release) version 0.8.0 2022-03-25 10:11:26 +01:00
Marc-Antoine ARNAUD
4444d3f507
Merge pull request #133 from amy-keibler/131-skip-serializing
Add "skip_serializing" attribute
2022-03-25 10:06:14 +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
Amy Keibler
14dcfc43d7 Add "skip_serializing" attribute
If it is present on a field, that field should not be included in the output
If both "skip_serializing" and "skip_serializing_if" are present,
"skip_serializing" should take precedent.
2022-01-06 11:26:32 -05:00
Marc-Antoine ARNAUD
19b51168c9
Merge pull request #130 from media-io/dependabot/cargo/heck-0.4.0
Update heck requirement from 0.3.1 to 0.4.0
2021-12-16 16:31:59 +01:00
dependabot[bot]
2e3563f50c
Update heck requirement from 0.3.1 to 0.4.0
Updates the requirements on [heck](https://github.com/withoutboats/heck) to permit the latest version.
- [Release notes](https://github.com/withoutboats/heck/releases)
- [Changelog](https://github.com/withoutboats/heck/blob/master/CHANGELOG.md)
- [Commits](https://github.com/withoutboats/heck/commits)

---
updated-dependencies:
- dependency-name: heck
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-13 06:05:32 +00: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
Marc-Antoine ARNAUD
31440a76a5
Merge pull request #120 from Felerius/derive-log-targets
Use "yaserde_derive" as the log target for generated logging calls
2021-12-01 17:10:11 +01:00
Alexander Galibey
c7e68694cd Handle default ns prefix 2021-09-12 20:34:11 +03: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
Marc-Antoine Arnaud
01246c1f6e bump to 0.7.1 2021-07-06 15:49:16 +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
1ff9ae3323 bump to 0.7.0 2021-05-31 11:40:36 +02:00
Marc-Antoine ARNAUD
29261a3590
Merge pull request #108 from olvyko/add-skip-ser-if
Add skip_serializing_if support for attributes
2021-05-31 10:45:35 +02: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
olvyko
0139d63f6d Alter yaserde_derive crate to support skip_serialize_if for attributes 2021-04-29 21:39:47 +06:00
Roman Valls Guimera
9bbb1a6cc9 XML prettyprint documentation 2021-02-11 19:50:56 +11:00
Marc-Antoine Arnaud
082cc0d953 bump to 0.6.0 2021-02-08 14:39:49 +01:00
Marc-Antoine ARNAUD
44854b0d4d
Merge pull request #105 from ephraimkunz/serialize-conflict
Use fully qualified method names to prevent collisions with serde derive macros
2021-02-08 11:37:25 +01:00
Ephraim Kunz
269975d953 Use fully qualified method names to prevent collisions with serde derive macros 2021-02-05 19:26:54 -08:00
Ephraim Kunz
07c2106256 Add unit test for attribute filtering 2021-02-04 20:02:39 -08:00
Ephraim Kunz
7d2658adaf Add filter to only look at 'yaserde' attributes 2021-02-04 19:45:34 -08:00
Marc-Antoine Arnaud
fcab1c0245 bump to 0.5.1 2021-01-08 10:10:02 +01:00
Marc-Antoine Arnaud
2926e0b620 bump to 0.5.0 2021-01-08 10:05:50 +01: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
Jonas Platte
c98845fc42
Remove redundant lib name from yaserde_derive/Cargo.toml 2020-12-02 15:48:10 +01:00
marcelbuesing
798455faa8
Avoid breaking keywords in labels.
Keywords such as `ref` previously lead to labels such as `__#ref__value`.
This should be `__ref__value`.
2020-10-07 10:13:52 +02:00
Marc-Antoine Arnaud
6e2930e2df bump to 0.4.3 2020-08-26 23:33:12 +02:00
Marc-Antoine Arnaud
fc5625a5e4 parse bool as defined in xs:boolean 2020-08-26 23:32:24 +02:00
Marc-Antoine Arnaud
dc558a73e4 publish 0.4.2 2020-08-05 10:56:35 +02:00
Marc-Antoine ARNAUD
c25d8d420f
Merge pull request #88 from marcelbuesing/master
Enforce std String in macros to avoid collisions
2020-08-05 10:38:16 +02:00
marcelbuesing
701b92a2a4
Enforce std String in macros to avoid collisions 2020-08-03 20:28:53 +02:00
Horaci Macias
c2d9a9fb64 Before formatting 2020-07-21 09:36:55 +02:00
Horaci Macias
c76ad9fe59 Working on flatten 2020-07-21 09:11:59 +02:00
Horaci Macias
b1d11f4e3a Trying to address https://github.com/media-io/yaserde/issues/63 2020-07-20 17:16:00 +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